From faa7d81b679346623c9f023042ddc40dee808e6f Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Mon, 1 Nov 2010 17:24:24 -0700 Subject: Add browser().reload() to simulate a refresh from a user --- test/scenario/dslSpec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js index cc002612..d06c3ec9 100644 --- a/test/scenario/dslSpec.js +++ b/test/scenario/dslSpec.js @@ -88,6 +88,17 @@ describe("angular.scenario.dsl", function() { }); describe('Browser', function() { + describe('Reload', function() { + it('should navigateTo', function() { + $window.location = { + href: '#foo' + }; + $root.dsl.browser().reload(); + expect($root.futureResult).toEqual('#foo'); + expect($window.location).toEqual('#foo'); + }); + }); + describe('NavigateTo', function() { it('should allow a string url', function() { $root.dsl.browser().navigateTo('http://myurl'); -- cgit v1.2.3