Skip to content

Commit

Permalink
test(update): fix new syntax for query acknowledgement
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenWesterlaken committed Sep 11, 2021
1 parent 8b064a3 commit 2379a30
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/functions/4_update_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Mongo4J Updating', () => {
const neo_stats = getStats(results);

expect(neo_stats.propertiesSet).to.be.at.least(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH ' +
'(n:Person {m_id : $id }) ' +
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('Mongo4J Updating', () => {
const neo_stats = getStats(results);

expect(neo_stats.propertiesSet).to.be.at.least(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (n:Person {m_id : $id})-[p]-(a:Address) RETURN a;', {id: neil._id.toString()});

Expand Down Expand Up @@ -145,7 +145,7 @@ describe('Mongo4J Updating', () => {
const neo_stats = getStats(results);

expect(neo_stats.propertiesSet).to.be.at.least(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (d:Book {m_id: $book_id})-[pa]-(a:Class {m_id: $id})-[pb]-(n:Book) RETURN d,n,a;', {id: chemistry._id.toString(), book_id: chemistry.books[0]._id.toString()});

Expand Down Expand Up @@ -213,7 +213,7 @@ describe('Mongo4J Updating', () => {

expect(neo_stats.relationshipsCreated).to.equal(1);
expect(neo_del_stats.relationshipsDeleted).to.equal(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (n:Class)-[p]-(a:Person) RETURN n,p,a;');

Expand Down Expand Up @@ -277,7 +277,7 @@ describe('Mongo4J Updating', () => {

expect(neo_stats.relationshipsCreated).to.equal(2);
expect(neo_del_stats.relationshipsDeleted).to.equal(2);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

done();
});
Expand Down Expand Up @@ -329,7 +329,7 @@ describe('Mongo4J Updating', () => {

expect(neo_stats.relationshipsCreated).to.equal(1);
expect(neo_del_stats.relationshipsDeleted).to.equal(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (n:Class)-[p]-(a:Person) RETURN n,p,a;');

Expand Down Expand Up @@ -411,7 +411,7 @@ describe('Mongo4J Updating', () => {

expect(neo_stats.relationshipsCreated).to.equal(2);
expect(neo_del_stats.relationshipsDeleted).to.equal(2);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (h:Class {title: \'Chemistry\'})-[pa]-(a:Person)-[pb]-(d:Class) RETURN h,pa,a,pb,d;');

Expand Down Expand Up @@ -461,7 +461,7 @@ describe('Mongo4J Updating', () => {
const neo_stats = getStats(results);

expect(neo_stats.propertiesSet).to.be.at.least(1);
expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;

return session.run('MATCH (n:Person {m_id : $id})-[p]-(a:Address) RETURN a;', {id: neil._id.toString()});

Expand Down Expand Up @@ -550,7 +550,7 @@ describe('Mongo4J Updating', () => {
const neo_del_stats = getStats(results, true);
const neo_stats = getStats(results);

expect(results[0].ok).to.equal(1);
expect(results[0].acknowledged).to.be.true;
expect(neo_stats.propertiesSet).to.be.at.least(1);
expect(neo_stats.relationshipsCreated).to.equal(3);
expect(neo_del_stats.relationshipsDeleted).to.equal(3);
Expand Down

0 comments on commit 2379a30

Please sign in to comment.