Skip to content

Commit

Permalink
fixes router tests for contacts route, adds contactsprofile route test
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed Jan 23, 2013
1 parent d16ee19 commit 987e0f3
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions source/js/spec/routerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe("The router", function(){
describe("its contacts route", function(){
var contactsRoute = null;
beforeEach(function(){
contactsRoute = userRoute.get("contacts.index").create();
contactsRoute = userRoute.get("contacts").create();
});

it ("should have route of /contacts", function(){
Expand All @@ -108,7 +108,25 @@ describe("The router", function(){

it("should have a accept function", function(){
expect(contactsRoute.goAccept).toBeDefined();
});
});
describe("its contacts profile route", function(){
var profileCRoute = null;
beforeEach(function(){
profileCRoute = contactsRoute.get("contactsprofile").create();
});

it ("should have route of /:user_id", function(){
expect(profileCRoute.get("route")).toEqual("/:user_id");
});

it("should have an serialize: function", function(){
expect(profileCRoute.serialize).toBeDefined();
});

it("should have a deserialize: function", function(){
expect(profileCRoute.deserialize).toBeDefined();
});
});
});
});
});
Expand Down

0 comments on commit 987e0f3

Please sign in to comment.