Ensure JSInput tests actually run

This test currently fails, meaning that the existing tests weren't
testing what they claimed.

Assertions are made for each element returned by the CSS selectors.
However, the selectors are assumed to be wildcard matches, but are
actually literal selectors. As there are no matched elements, this
causes the assertions to be (silently) checked zero times, without
failure.
This commit is contained in:
stv
2014-06-04 17:56:10 -07:00
parent 858f3ae5c9
commit e2cab19084

View File

@@ -27,4 +27,12 @@ describe("JSInput", function() {
expect(inputField.data('waitfor')).toBeDefined();
});
});
it('tests the correct number of sections', function () {
var sections = $(document).find('section[id="inputtype_"]');
var inputFields = $(document).find('input[id="input_"]');
expect(sections.length).toEqual(2);
expect(sections.length).toEqual(inputFields.length);
});
});