Skip to content

Commit

Permalink
search is working; trust me :) still needs a solid test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
dermidgen committed Apr 2, 2015
1 parent e82381d commit a94a9cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ if(fs.existsSync('./test/servers.json')){
});

it('Can search for property listings',function(done){
var search = '';

var timeout = setTimeout(function(){
rets.removeAllListeners('search');
Expand All @@ -383,11 +384,14 @@ if(fs.existsSync('./test/servers.json')){
rets.addListener('search',function(err){
rets.removeAllListeners('search');
clearTimeout(timeout);
assert(err === null);
assert(err === null && search !== '');
done();
});

rets.search(item.search);
rets.search(item.search)
.on('data',function(line){
search += line.toString();
});
});

it('Can logout of my RETS server: ' + rets.session.url.host, function(done){
Expand Down

0 comments on commit a94a9cf

Please sign in to comment.