Sha256: a35e6378dd7e8fbe688a7943984d2dd327a098c001db2cf1e713a5fc2724974f
Contents?: true
Size: 1.22 KB
Versions: 23
Compression:
Stored size: 1.22 KB
Contents
define(["js/model/application"],function(e){describe("The application model represents an application in the system.",function(){var t=new e;beforeEach(function(){t=new e}),it("The application object should be defined.",function(){expect(t).toBeDefined()}),describe("The application object should have the following defined backbone attributes.",function(){it("should have an id",function(){expect(t.get("id")).toBeDefined()}),it("should have a userId",function(){expect(t.get("userId")).toBeDefined()}),it("should have a name",function(){expect(t.get("name")).toBeDefined()})}),describe("The application object should have the following defined attributes.",function(){it("should have a defined url route /applications when id is not defined",function(){expect(t.get("id")).toBeNull(),expect(t.url()).toEqual("/applications")})}),describe("The application object should have the following defined attributes after initialize.",function(){it("should have a defined url route /applications/# when id is defined",function(){t.set({id:3,userId:1,name:"Cylon"}),expect(t.get("id")).not.toBeNull(),expect(t.get("id")).toEqual(3),expect(t.get("userId")).toEqual(1),expect(t.get("name")).toEqual("Cylon"),expect(t.url()).toEqual("/applications/3")})})})});
Version data entries
23 entries across 23 versions & 1 rubygems