diff options
| author | Misko Hevery | 2013-05-02 14:12:48 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-05-02 15:22:17 -0400 | 
| commit | 4bd7bedf48c0c1ebb62f6bd8c85e8ea00f94502b (patch) | |
| tree | 82ffeee6a096bca33c70a8b4b6d2ba1a3917665e /test | |
| parent | fd21c7502f0a25364a810c26ebeecb678e5783c5 (diff) | |
| download | angular.js-4bd7bedf48c0c1ebb62f6bd8c85e8ea00f94502b.tar.bz2 | |
fix($location): prevent navigation if already on the URL
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/locationSpec.js | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index fb828044..3588150d 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -819,6 +819,19 @@ describe('$location', function() {      }); +    it('should do nothing if already on the same URL', function() { +      configureService('/base/', true, true); +      inject( +        initBrowser(), +        initLocation(), +        function($browser) { +          browserTrigger(link, 'click'); +          expectNoRewrite($browser, 'http://host.com/base/'); +        } +      ); +    }); + +      it('should rewrite abs link to new url when history enabled on new browser', function() {        configureService('/base/link?a#b', true, true);        inject( | 
