Skip to content

Commit

Permalink
catch Neo4j issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Apr 19, 2013
1 parent c6dad85 commit b452748
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/integration/rest_batch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b452748

Please sign in to comment.