1 describe('Deck JS Status Indicator', function() {
2 beforeEach(function() {
3 loadFixtures('standard.html');
4 if (Modernizr.history) {
5 history.replaceState({}, "", "#")
8 window.location.hash = '#';
13 it('should start with scaling enabled', function() {
14 expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
17 describe('disableScale()', function() {
18 it('should remove the scale class from the container', function() {
19 $.deck('disableScale');
20 expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
24 describe('enableScale()', function() {
25 it('should add the scale class to the container', function() {
26 $.deck('disableScale');
27 $.deck('enableScale');
28 expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
32 describe('toggleScale()', function() {
33 it('should toggle between adding and removing the scale class', function() {
34 $.deck('toggleScale');
35 expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
36 $.deck('toggleScale');
37 expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
41 describe('key bindings', function() {
45 beforeEach(function() {
46 e = jQuery.Event('keydown.deckscale');
49 it('should toggle scaling if the specified key is pressed', function() {
52 expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
54 expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);