it("does NOT replace route if invalid route is requested", function() { SetupLinksAndPushState.replacePath(1); SetupLinksAndPushState.replacePath(); SetupLinksAndPushState.replacePath({}); expect(Backbone.history.navigate).not.toHaveBeenCalled(); });
it("replaces route with requested route", function() { SetupLinksAndPushState.replacePath("newRoute"); expect(Backbone.history.navigate).toHaveBeenCalledWith("newRoute", { replace: true }); });
it("does NOT trigger requested route", function() { SetupLinksAndPushState.replacePath("newRoute"); expect(Backbone.history.navigate).not.toHaveBeenCalled(); });