Set up ember-cli-flash
This commit is contained in:
parent
a8fdff6be0
commit
c1b180ebac
11 changed files with 45 additions and 14 deletions
3
tests/helpers/flash-message.js
Normal file
3
tests/helpers/flash-message.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import FlashObject from 'ember-cli-flash/flash/object';
|
||||
|
||||
FlashObject.reopen({ _destroyLater: null });
|
|
@ -1,4 +1,6 @@
|
|||
import resolver from './helpers/resolver';
|
||||
import flashMessageHelper from './helpers/flash-message';
|
||||
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
|
||||
moduleForComponent('custom-flash-message', 'Unit | Component | custom flash message', {
|
||||
// Specify the other units that are required for this test
|
||||
// needs: ['component:foo', 'helper:bar'],
|
||||
unit: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Creates the component instance
|
||||
var component = this.subject();
|
||||
assert.equal(component._state, 'preRender');
|
||||
|
||||
// Renders the component to the page
|
||||
this.render();
|
||||
assert.equal(component._state, 'inDOM');
|
||||
});
|
Reference in a new issue