File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -500,6 +500,20 @@ describe("widget", function(){
500500 } ) ;
501501
502502 describe ( 'a' , function ( ) {
503+
504+ beforeEach ( function ( ) {
505+ //TODO (igor): lame workaround for
506+ //http://code.google.com/p/js-test-driver/issues/detail?id=144
507+ document . location . hash = '' ;
508+ } ) ;
509+
510+
511+ afterEach ( function ( ) {
512+ //TODO (igor): see beforeEach
513+ document . location . hash = '' ;
514+ } ) ;
515+
516+
503517 it ( 'should prevent default action to be executed when href is empty' , function ( ) {
504518 var orgLocation = document . location . href ,
505519 preventDefaultCalled = false ,
@@ -532,6 +546,15 @@ describe("widget", function(){
532546
533547 expect ( document . location . href ) . toEqual ( orgLocation ) ;
534548 } ) ;
535- } )
549+
550+
551+ it ( 'should change location when href is nonempty' , function ( ) {
552+ var orgLocation = document . location . href ;
553+
554+ compile ( '<a href="#newLocation">goto</a>' ) ;
555+ click ( element ) ;
556+ expect ( document . location . href ) . toEqual ( orgLocation + 'newLocation' ) ;
557+ } ) ;
558+ } ) ;
536559} ) ;
537560
You can’t perform that action at this time.
0 commit comments