mercredi 27 janvier 2016

Creating ember data model in component integration test

I am using a component integration test

moduleForComponent('my-component', 'Integration | Component | my component', {
  integration: true
});

My component accepts an ember-data model. So essentially I would like to do:

this.set('store', Ember.inject.service('store'))
this.set('model', this.get('store').createRecord('employee'));

Then:

this.render(hbs`my-component model=model`);

But when it creates the employee ember-data model, the DS namespace is showing DS.default in the debugger which in turn screws up DS.attr because it is now undefined.




Aucun commentaire:

Enregistrer un commentaire