[jquery] update tests with @BigFunger feedback

This commit is contained in:
spalger 2015-09-23 12:46:11 -07:00
parent 203f145ebe
commit 7f2a2c2080

View file

@ -16,7 +16,17 @@ describe('jQuery.findTestSubject', function () {
expect($found.is($noMatch)).to.be(false);
});
it('finds all of the elements with either "saveButton" or "cancelButton"', function () {
it('finds multiple elements with a subject', function () {
var $container = $('<div>');
var $match = $make('subject').appendTo($container);
var $otherMatch = $make('subject').appendTo($container);
var $found = $container.findTestSubject('subject');
expect($found.filter($match).size()).to.be(1);
expect($found.filter($otherMatch).size()).to.be(1);
});
it('finds all of the elements with either subject', function () {
var $container = $('<div>');
var $match1 = $make('subject').appendTo($container);
var $match2 = $make('alsoSubject').appendTo($container);