15 lines
357 B
Plaintext
15 lines
357 B
Plaintext
describe '<%= plural_object_name %>', ->
|
|
collection = null
|
|
|
|
withServer()
|
|
|
|
it 'should fetch records from the API', ->
|
|
collection = new <%= plural_object_name %>()
|
|
|
|
@server.respondWith('GET', '/<%= plural_underscore_name %>', @validJSONResponse([{id: 1}]))
|
|
collection.fetch()
|
|
@server.respond()
|
|
|
|
expect(collection.length).toEqual(1)
|
|
|