Skip to content

Commit

Permalink
[#1449] Remove unneeded tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jan 28, 2014
1 parent 9ddf9b9 commit aaa82aa
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions ckan/public/base/test/spec/modules/custom-fields.spec.js
Expand Up @@ -135,38 +135,13 @@ describe('ckan.module.CustomFieldsModule()', function () {
assert.isTrue(this.target.hasClass('disabled'));
});

it('should set the disabled property on the input elements', function () {
this.module.disableField(this.target);

this.target.find(':input').each(function () {
if (jQuery(this).is(':checkbox')) {
assert.isFalse(this.disabled, 'checkbox should not be disabled');
} else {
assert.isTrue(this.disabled, 'input should be disabled');
}
});
});

it('should remove a .disable class to the element if disable is false', function () {
this.target.addClass('disable');

this.module.disableField(this.target, false);
assert.isFalse(this.target.hasClass('disabled'));
});

it('should unset the disabled property on the input elements if disable is false', function () {
this.target.find(':input:not(:checkbox)').prop('disabled', true);

this.module.disableField(this.target, false);

this.target.find(':input').each(function () {
if (jQuery(this).is(':checkbox')) {
assert.isFalse(this.disabled, 'checkbox should not be disabled');
} else {
assert.isFalse(this.disabled, 'input should not be disabled');
}
});
});
});

describe('._onChange(event)', function () {
Expand Down

0 comments on commit aaa82aa

Please sign in to comment.