Skip to content

Commit

Permalink
Added .one() assertion test with text
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 8, 2010
1 parent 2744662 commit a423570
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/assertions.test.js
Expand Up @@ -30,7 +30,7 @@ app.get('/user/:id', function(req, res){
});

app.get('/list', function(req, res){
res.send('<ul><li>one</li><li>two</li><li><em>three<em></li></ul>');
res.send('<p>Wahoo</p><ul><li>one</li><li>two</li><li><em>three<em></li></ul>');
});

app.get('/attrs', function(req, res){
Expand Down Expand Up @@ -117,7 +117,11 @@ exports['test .one()'] = function(done){
err(function(){
$('ul').should.have.one('li');
}, "expected [jQuery 'ul'] to have one 'li' tag, but has three");


err(function(){
$('*').should.have.one('p', 'Wahoos');
}, "expected [jQuery '* p'] to have text 'Wahoos', but has 'Wahoo'");

done();
});
};
Expand Down

0 comments on commit a423570

Please sign in to comment.