17 lines
382 B
Plaintext
17 lines
382 B
Plaintext
describe('<%= object_name %>s', function() {
|
|
var collection;
|
|
|
|
withServer();
|
|
|
|
it('should fetch records from the API', function() {
|
|
collection = new <%= object_name %>s();
|
|
|
|
this.server.respondWith('GET', '<%= underscore_name %>', this.validJSONResponse([{id: 1}]));
|
|
collection.fetch()
|
|
this.server.respond();
|
|
|
|
expect(collection.length).toEqual(1);
|
|
});
|
|
});
|
|
|