diff options
| author | mo <mo.khan@gmail.com> | 2017-09-24 15:49:07 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-24 15:49:07 -0600 |
| commit | acb775c8b05c3aaae39040b87302f25ab81d196c (patch) | |
| tree | 1bc216fc0fb26808331ab82fb2fee7098716da10 | |
| parent | fb082e6bf91c5ee0c058c83816f8407b3cee0e7e (diff) | |
add spec for auto collection.
| -rw-r--r-- | spec/javascripts/models/auto_collection_spec.js.coffee | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/javascripts/models/auto_collection_spec.js.coffee b/spec/javascripts/models/auto_collection_spec.js.coffee new file mode 100644 index 00000000..6dfd9149 --- /dev/null +++ b/spec/javascripts/models/auto_collection_spec.js.coffee @@ -0,0 +1,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') + |
