From b4527481aa8e2b503e034891682671c39a520141 Mon Sep 17 00:00:00 2001 From: Max De Marzi Date: Fri, 19 Apr 2013 10:37:09 -0500 Subject: [PATCH] catch Neo4j issue --- spec/integration/rest_batch_spec.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/integration/rest_batch_spec.rb b/spec/integration/rest_batch_spec.rb index eef312e..fb1adcb 100644 --- a/spec/integration/rest_batch_spec.rb +++ b/spec/integration/rest_batch_spec.rb @@ -441,13 +441,15 @@ [:create_relationship, "has", "{0}", "{2}", {}] batch_result.should_not be_nil - batch_result = @neo.batch [:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}], - [:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"], - [:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}], - [:create_relationship, "has", "{0}", "{2}", {}] # create_unique_node is returning an index result, not a node, so we can't do this yet. # See https://github.com/neo4j/community/issues/697 - batch_result.should_not be_nil + + expect { + batch_result = @neo.batch [:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}], + [:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"], + [:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}], + [:create_relationship, "has", "{0}", "{2}", {}] + }.to raise_error(Neography::BadInputException) end end