diff options
| author | Elliott Sprehn | 2010-11-01 17:24:24 -0700 | 
|---|---|---|
| committer | Elliott Sprehn | 2010-11-01 17:24:24 -0700 | 
| commit | faa7d81b679346623c9f023042ddc40dee808e6f (patch) | |
| tree | e3e364fd3687752ffe2d6e41a9510717b4700756 /test/scenario | |
| parent | 6bb2cd6ee2a35768ac4422395596daf1438e62ff (diff) | |
| download | angular.js-faa7d81b679346623c9f023042ddc40dee808e6f.tar.bz2 | |
Add browser().reload() to simulate a refresh from a user
Diffstat (limited to 'test/scenario')
| -rw-r--r-- | test/scenario/dslSpec.js | 11 | 
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');  | 
