Skip to content
This repository was archived by the owner on Oct 10, 2017. It is now read-only.

Commit

Permalink
set contacts route when switching to the contacts app
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Bailey committed Sep 20, 2012
1 parent 86ba57a commit a3fccec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ BBCloneMail.module("ContactsApp.ContactList", {

that.region.show(view);
});

Backbone.history.navigate("contacts");
},

getContacts: function(callback){
Expand Down
5 changes: 5 additions & 0 deletions spec/javascripts/contactList.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe("contacts list", function(){
var requestHandler, ContactList;

beforeEach(function(){
startHistory();
affix("#contact-item-template div[text=Joe Johnson]");
affix("article#main");

Expand All @@ -31,5 +32,9 @@ describe("contacts list", function(){
expect(BBCloneMail.main.$el).toHaveText("Joe Johnson");
});

it("should navigate to the #contacts route", function(){
expect(window.location.hash).toBe("#contacts");
});

});
});

0 comments on commit a3fccec

Please sign in to comment.