Sha256: 82945f9aa197cb5e64643c80608d4e22f8d6c9c6866438e3e9e4db13de9135e2

Contents?: true

Size: 1.52 KB

Versions: 62

Compression:

Stored size: 1.52 KB

Contents

(function () {
    'use strict';

    describe('WORKAREA.contentBlocks', function () {
        describe('init', function () {
            beforeEach(function () {
                this.fixtures = fixture.load('content_block.html');
            });

            afterEach(function () {
                WORKAREA.takeover.close();
            });

            it('activates when clicked', function () {
                WORKAREA.contentBlocks.init($(this.fixtures));

                $('.content-block').addClass('content-block--inactive');

                $('.content-block__overlay').trigger('click');

                expect(_.isEmpty('.content-block--active')).to.equal(false);
            });
        });

        describe('activateBlock', function() {
            it('activates the content block', function() {
                var $fixture = $(fixture.load('content_block.html')),
                    $block = $('.content-block', $fixture).first();

                WORKAREA.contentBlocks.activateBlock($block);

                expect(_.isEmpty($('.content-block--active'))).to.equal(false);
            });
        });

        describe('deactivateBlock', function() {
            it('deactivates the content block', function() {
                var $fixture = $(fixture.load('content_block.html')),
                    $block = $('.content-block', $fixture).first();

                WORKAREA.contentBlocks.deactivateBlock($block);

                expect(_.isEmpty($('.content-block--active'))).to.equal(true);
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.26 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.45 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.25 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.23 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.44 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.22 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.43 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.21 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.42 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.20 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.41 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.19 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.40 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.18 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.39 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.17 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.38 test/javascripts/content_blocks_spec.js
workarea-admin-3.5.16 test/javascripts/content_blocks_spec.js
workarea-admin-3.4.37 test/javascripts/content_blocks_spec.js