Commits

Kenneth Jørgensen committed 3b24dff

Added more future tests

Comments (0)

Files changed (3)

spec/CollectionSpec.coffee

+_ = require "underscore"
+sinon = require "sinon"
+{Collection} = require "../antifreeze"
+
+describe "Collection", ->
+	it "should be empty when first created"
+	it "should add new values given to it"
+	it "should remove values"
+	it "should accept initial array values"
+	it "should accept initial Collection values and make a copy"
+
+	describe "change events", ->
+		it "should trigger cahnge events when adding an element"
+		it "should trigger change events when removing an element"
+		it "should trigger change events on sub-models"
+		it "should not trigger change events on detached sub-models"
+
+	describe "serialization", ->
+		it "should serialize to a json array"
+		it "should not recursively serialize models"

spec/MapSpec.coffee

+_ = require "underscore"
+sinon = require "sinon"
+{Map} = require "../antifreeze"
+
+describe "Map", ->
+	it "should be empty when first created"
+	it "should add new values"
+	it "should overwrite existing values"
+	it "should remove values"
+	it "should accept initial Map values and make a copy"
+
+	describe "change events", ->
+		it "should trigger cahnge events when adding an element"
+		it "should trigger change events when removing an element"
+		it "should trigger change events on sub-models"
+		it "should not trigger change events on detached sub-models"
+
+	describe "serialization", ->
+		it "should serialize to a json object"
+		it "should complain if key objects cannot convert to strings"
+		it "should not recursively serialize models"

src/SetSpec.coffee

+_ = require "underscore"
+sinon = require "sinon"
+{Set} = require "../antifreeze"
+
+describe "Set", ->
+	it "should be empty when first created"
+	it "should add new values given to it"
+	it "should not accept the same value twice"
+	it "should remove values"
+	it "should accept initial array values"
+	it "should accept initial Collection values and make a copy"
+
+	describe "change events", ->
+		it "should trigger change events when adding an element"
+		it "should not trigger change events when adding an element"
+		it "should trigger change events when removing an element"
+		it "should trigger change events on sub-models"
+		it "should not trigger change events on detached sub-models"
+
+	describe "serialization", ->
+		it "should serialize to a json array"
+		it "should not recursively serialize models"