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.27 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.26 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.45 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.25 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.23 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.44 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.22 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.43 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.21 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.42 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.20 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.41 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.19 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.40 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.18 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.39 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.17 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.38 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.5.16 test/javascripts/authenticity_token_spec.js
workarea-storefront-3.4.37 test/javascripts/authenticity_token_spec.js