Sha256: 4f1352590dbe1e068f4ea95773559b709c250fbffbe9692d6a83a38510946263

Contents?: true

Size: 860 Bytes

Versions: 6

Compression:

Stored size: 860 Bytes

Contents

//= require workarea/core/config
//
(function () {
    'use strict';

    describe('WORKAREA.productReviewAjaxSubmit', function () {
        describe('init', function () {
            var formIsInDialog = function ($form) {
                    return ! _.isEmpty(WORKAREA.dialog.closest($form));
                };

            beforeEach(function () {
                this.fixtures = fixture.load('product_review_ajax_submit.html');

                WORKAREA.dialog.create($(this.fixtures));
                WORKAREA.productReviewAjaxSubmit.init($(this.fixtures));
            });

            it('dialog remains if form invalid', function () {
                expect($('form').valid()).to.equal(false);

                $('form').trigger('submit');

                expect(formIsInDialog($('form'))).to.equal(true);
            });
        });
    });
}());

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-reviews-3.1.2 test/javascripts/product_review_ajax_submit_spec.js
workarea-reviews-3.1.1 test/javascripts/product_review_ajax_submit_spec.js
workarea-reviews-3.1.0 test/javascripts/product_review_ajax_submit_spec.js
workarea-reviews-3.0.10 test/javascripts/product_review_ajax_submit_spec.js
workarea-reviews-3.0.9 test/javascripts/product_review_ajax_submit_spec.js
workarea-reviews-3.0.8 test/javascripts/product_review_ajax_submit_spec.js