Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

Acceptance test failing because of authentication

$
0
0

@Jeffrey_Cheung wrote:

Hi guys, I am writing the following acceptance test:

test('visiting /posts', function(assert) {
  visit('/posts');

  andThen(function() {
    assert.equal(currentURL(), '/posts');
  });
});

But it is failing because I haven’t logged in, so the application redirects me to login page. Here is what I get from QUnit:

Expected:
"/posts"
Result:
"/login"
Diff:
"/postslogin"

How do I make sure the testing environment is already logged in?

Side Note: I am not using ember-simple-auth for authentication, but a user service.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles