I want to test a controller action like this:
createNewBase: function () {
var attributesForNewBase = this.get( 'model' ).getProperties( ... ),
self = this,
newBase = this.store.createRecord( ..., {
...
} );
newBase.save().then( function ( createdBase ) {
self.send( 'setBaseOfModel', createdBase );
}, function ( error ) {
console.log( error );
} );
}
The problem is that if I use moduleFor of ember-qunit to test this action the store is undefined. So what do I have to do or what is the correct way to create such tests?