Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Jun 26, 2012
1 parent 3274dab commit 1b11aea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions test/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ describe('indexing', function(){
it('should be able to execute a simple query', function(done){
Tweet.search({query:'Riak'}, function(err, results) {
results.total.should.eql(1)
results.hits[0].message.should.eql('I like Riak better')
results.hits[0]._source.message.should.eql('I like Riak better')
done()
});
});
it('should be able to execute a simple query', function(done){
Tweet.search({query:'jamescarr'}, function(err, results) {
results.total.should.eql(1)
results.hits[0].message.should.eql('I like Riak better')
results.hits[0]._source.message.should.eql('I like Riak better')
done()
});
});
Expand Down Expand Up @@ -154,14 +154,14 @@ describe('indexing', function(){
it('should only find models of type Tweet', function(done){
Tweet.search({query:'Dude'}, function(err, res){
res.total.should.eql(1);
res.hits[0].user.should.eql('Dude');
res.hits[0]._source.user.should.eql('Dude');
done();
});
});
it('should only find models of type Talk', function(done){
Talk.search({query:'Dude'}, function(err, res){
res.total.should.eql(1);
res.hits[0].title.should.eql('Dude');
res.hits[0]._source.title.should.eql('Dude');
done();
});
});
Expand Down Expand Up @@ -197,7 +197,7 @@ describe('indexing', function(){
Talk.search({query:'cool'}, function(err, res) {
res.total.should.eql(1);

var talk = res.hits[0];
var talk = res.hits[0]._source;
talk.should.have.property('title');
talk.should.have.property('abstract');
talk.should.not.have.property('speaker');
Expand Down
2 changes: 1 addition & 1 deletion test/search-features-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Query DSL', function(){
}, function(err, res){
res.total.should.eql(2);
res.hits.forEach(function(bond){
['Legal', 'Construction'].should.include(bond.name);
['Legal', 'Construction'].should.include(bond._source.name);
});
done();
});
Expand Down

0 comments on commit 1b11aea

Please sign in to comment.