aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/dslSpec.js
diff options
context:
space:
mode:
authorElliott Sprehn2010-11-01 17:24:24 -0700
committerElliott Sprehn2010-11-01 17:24:24 -0700
commitfaa7d81b679346623c9f023042ddc40dee808e6f (patch)
treee3e364fd3687752ffe2d6e41a9510717b4700756 /test/scenario/dslSpec.js
parent6bb2cd6ee2a35768ac4422395596daf1438e62ff (diff)
downloadangular.js-faa7d81b679346623c9f023042ddc40dee808e6f.tar.bz2
Add browser().reload() to simulate a refresh from a user
Diffstat (limited to 'test/scenario/dslSpec.js')
-rw-r--r--test/scenario/dslSpec.js11
1 files changed, 11 insertions, 0 deletions
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');