mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -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')
|