Skip to content

Commit

Permalink
making note that batch create unique node does not return a referable…
Browse files Browse the repository at this point in the history
… node
  • Loading branch information
maxdemarzi committed Jul 10, 2012
1 parent 79ce7eb commit 100aa75
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions spec/integration/rest_batch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,23 +395,20 @@
end

it "can create a relationship from a unique node" do

require 'net-http-spy'
Net::HTTP.http_logger_options = {:verbose => true} # see everything

batch_result = @neo.batch [:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}],
[:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"],
[:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}],
[:create_relationship, "has", "{0}", "{2}", {}]
puts batch_result.inspect
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}", {}]

puts batch_result.inspect
# 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
end

end
Expand Down

0 comments on commit 100aa75

Please sign in to comment.