Permalink
Browse files

add integration tests for default route

  • Loading branch information...
1 parent aa7d480 commit be348ffbeca852260e9fa3ee981eec4e9c03e0b8 @podefr podefr committed Sep 7, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 specs/integration.spec.js
View
13 specs/integration.spec.js
@@ -837,6 +837,19 @@ function(OObject, Plugins, EventPlugin, BindPlugin, Store, DomUtils, PlacePlugin
expect(spy).toHaveBeenCalledWith("66");
});
+ it("falls back to the route provided by default if no route is specified in the URL", function () {
+ var locationRouter = new LocationRouter();
+ var spy = jasmine.createSpy();
+
+ locationRouter.set("default", spy);
+
+ window.location.hash = "";
+
+ locationRouter.start("default");
+
+ expect(spy).toHaveBeenCalled();
+ });
+
it("updates the hashmark when navigating to routes", function () {
var locationRouter = new LocationRouter();

0 comments on commit be348ff

Please sign in to comment.