mardi 1 septembre 2015

Ember test - Failed: Calling set on destroyed object

I'm currently trying to get started with writing tests (I know, I know, I should have done that before I wrote the application), but I'm currently stuck trying to test the login functionality.

Here is the test:

/* jshint expr:true */
import {
  describe,
  it,
  beforeEach,
  afterEach
} from 'mocha';
import { expect } from 'chai';
import Ember from 'ember';
import startApp from '../helpers/start-app';

describe('Integration: Authentication', function() {
  var application;

  beforeEach(function() {
    application = startApp();
  });

  afterEach(function() {
    Ember.run(application, 'destroy');
  });

  it('User can sign in', function() {
    visit('/signin').then(function() {
      fillIn('input[name="identification"]', 'username');
      fillIn('input[name="password"]', 'password');
      click('button[type="submit"]');
      andThen(function() {
        expect(currentPath()).to.equal('welcome');
      })
    });
  });
});

Im getting this error:

Error: Assertion Failed: calling set on destroyed object (http://localhost:7357/a ssets/vendor.js:19994)

Does anyone know how to solve this?

Thanks

Aucun commentaire:

Enregistrer un commentaire