I am attempting to use ember-cli
and ember-cli-ic-ajax
for Ember Data fixtures. I have imported ic.ajax.defineFixture
as icDefineFixture
.
icDefineFixture('/users', {
response: {
email: 'user@example.com'
},
textStatus: 'success',
jqXHR: {}
});
Which doesn't throw any errors, so I know I'm importing the function successfully. I then create a record, which goes okay:
this.store.createRecord('user', {});
But when I try and save it in a controller action:
this.get('model').save().then(function() { ... });
I get 404 errors because ember data is contacting my server which doesn't have a backend when I'm testing.
I'm puzzled how Ember Data is supposed to know to use ic-ajax's ajax methods. Is this something I must manually set up? I haven't managed to find any documentation on it.
Thanks!