Test for Textbook.reset method

This commit is contained in:
David Baumgold
2013-06-26 12:15:27 -04:00
parent 70a011770e
commit 8f2077b579

View File

@@ -26,6 +26,11 @@ describe "CMS.Models.Textbook", ->
it "should have a URL set", ->
expect(_.result(@model, "url")).toBeTruthy()
it "should be able to reset itself", ->
@model.set("name", "foobar")
@model.reset()
expect(@model.get("name")).toEqual("")
it "should not be dirty by default", ->
expect(@model.isDirty()).toBeFalsy()