Created
April 14, 2016 06:30
-
-
Save ryanlabouve/c86bcfd1956a04d6d4f0c226528ce44b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { test } from 'qunit'; | |
| import moduleForAcceptance from 'esa-debug/tests/helpers/module-for-acceptance'; | |
| import { | |
| authenticateSession, | |
| } from 'esa-debug/tests/helpers/ember-simple-auth'; | |
| moduleForAcceptance('Acceptance | login'); | |
| test('visiting /login', function(assert) { | |
| visit('/login'); | |
| andThen(function() { | |
| assert.equal(currentURL(), '/login'); | |
| }); | |
| }); | |
| test('cannot visit projects if not login', function(assert) { | |
| visit('/projects'); | |
| andThen(function() { | |
| assert.equal(currentURL(), '/login'); | |
| }); | |
| }); | |
| test('visiting /projects', function(assert) { | |
| authenticateSession(this.application); | |
| visit('/projects'); | |
| andThen(function() { | |
| // assert.equal(currentSession(application).get('isAuthenticated'), true) | |
| assert.equal(currentURL(), '/projects'); | |
| }); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment