summaryrefslogtreecommitdiff
path: root/spec/javascripts/models/auto_collection_spec.js.coffee
blob: 6dfd91493002f9b09da1684ba6ba20a27cce64d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
describe "AutoCollection", ->
  subject = null
  beforeEach ->
    subject = csx.AutoCollection

  describe ".install", ->
    it "installs a categories collection", ->
      subject.install('Categories', [id: 1, name: 'cakes'])

      expect(csx.Categories).not.toBe(undefined)
      expect(csx.Categories.length).toEqual(1)
      expect(csx.Categories.first().get('name')).toEqual('cakes')