Sha256: 3edddea46516519e8bf97dca3baa103be6ae4f2a1fee044edaa348ab5707c31b

Contents?: true

Size: 881 Bytes

Versions: 62

Compression:

Stored size: 881 Bytes

Contents

(function () {
    'use strict';

    describe('WORKAREA.authenticityToken', function () {
        it('appends authenticity token within jQuery.ajax#beforeSend', function() {
            this.fixtures = fixture.load('authenticity_token.html', false);
            WORKAREA.initModules($(this.fixtures));

            $.get('/')
                .then(function(response, event, xhr) {
                    expect(xhr.getResponseHeader('X-CSRF-Token')).to.equal('foo');
                })
                .done();
        });

        describe('init', function() {
            it('appends user authenticity token to forms', function() {
                WORKAREA.authenticityToken.init($(this.fixtures));

                var $input = $('form > input[type="hidden"][name="authenticity_token"]');

                expect($input).not.to.be.empty;
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.15 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.36 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.14 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.35 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.13 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.34 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.12 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.33 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.11 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.10 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.32 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.9 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.31 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.8 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.30 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.7 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.29 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.6 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.28 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.5 test/javascripts/authenticity_token_spec.js