Skip to content

Commit

Permalink
added a unit test for issue #9 to make sure it's working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkueng committed Feb 12, 2014
1 parent 3aadd90 commit 93ba703
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,22 @@ describe('\n=> Update Node(s) with label(s) and properties', function(){
});
});

describe('-> Run a cypher query with params from issue 9 by @withjam against existing nodes', function(done) {
it('should return a valid response', function(done) {
db.cypherQuery('MATCH (x {name: {root_node}})-[r]->(friends) RETURN friends', {
root_node: 'foobar'
}, function(err, result) {
onlyResult(err, result);
result.columns.should.include('friends');
result.data.should.be.an.instanceOf(Array);
result.data.should.have.lengthOf(2);
result.data[0].should.have.property('name', 'foobar2');
result.data[1].should.have.property('name', 'foobar3');
done();
});
});
});

/* TODO: fix error
describe('-> Run the cypher query from issue 7 from @Zaxnyd', function(done){
it('should return a node and the relationships', function(done){
Expand Down

0 comments on commit 93ba703

Please sign in to comment.