mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
12 lines
519 B
CoffeeScript
12 lines
519 B
CoffeeScript
CocoCollection = require 'collections/CocoCollection'
|
|
LevelComponent = require 'models/LevelComponent'
|
|
|
|
describe 'CocoCollection', ->
|
|
it 'can be given a project function to include a project query arg', ->
|
|
collection = new CocoCollection([], {
|
|
url: '/db/level.component'
|
|
project:['name', 'description']
|
|
model: LevelComponent
|
|
})
|
|
collection.fetch({data: {view: 'items'}})
|
|
expect(jasmine.Ajax.requests.mostRecent().url).toBe('/db/level.component?view=items&project=name%2Cdescription')
|