Make tests pass given @jeremybanks's Base element improvements
authorimakewebthings <[email protected]>
Fri, 13 Jul 2012 12:07:43 +0000 (13 20:07 +0800)
committerimakewebthings <[email protected]>
Fri, 13 Jul 2012 12:07:43 +0000 (13 20:07 +0800)
test/spec.hash.js
test/spec.navigation.js

index fa7bcab..c1faafd 100644 (file)
@@ -41,13 +41,13 @@ describe('Deck JS Hash Extension', function() {
        it('should update the href on slide change', function() {
                var $hashLink = $(defaults.selectors.hashLink);
                $.deck('go', 3);
-               expect($hashLink).toHaveAttr('href', '#slide-3');
+               expect($hashLink.attr('href')).toMatch('#slide-3');
        });
        
        it('should use existing ids if they exist', function() {
                var $hashLink = $(defaults.selectors.hashLink);
                $.deck('go', 1);
-               expect($hashLink).toHaveAttr('href', '#custom-id');
+               expect($hashLink.attr('href')).toMatch('#custom-id');
        });
        
        it('should update the URL on slide change (if supported)', function() {
index afdb39d..46f6f21 100644 (file)
@@ -42,10 +42,10 @@ describe('Deck JS Navigation Buttons', function() {
        });
        
        it('should update the links hrefs with real fragment ids', function() {
-               expect($(defaults.selectors.previousLink)).toHaveAttr('href', '#');
-               expect($(defaults.selectors.nextLink)).toHaveAttr('href', '#custom-id');
+               expect($(defaults.selectors.previousLink).attr('href')).toMatch(/#$/);
+               expect($(defaults.selectors.nextLink).attr('href')).toMatch('#custom-id');
                $.deck('go', 2);
-               expect($(defaults.selectors.previousLink)).toHaveAttr('href', '#custom-id');
-               expect($(defaults.selectors.nextLink)).toHaveAttr('href', '#slide-3');
+               expect($(defaults.selectors.previousLink).attr('href')).toMatch('#custom-id');
+               expect($(defaults.selectors.nextLink).attr('href')).toMatch('#slide-3');
        });
 });
\ No newline at end of file