Skip to content

Commit

Permalink
Created failing example for batch queries
Browse files Browse the repository at this point in the history
  • Loading branch information
David Raphael committed Apr 12, 2013
1 parent fd13a05 commit 7b87efb
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion spec/integration/rest_batch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -452,5 +452,26 @@
end

end


describe "broken queries" do
it "should return errors when bad syntax is passed in batch" do

batch_commands = []
batch_commands << [ :create_unique_node, "person", "ssn", "000-00-0001", {:foo => "bar"} ]

# this doesn't raise error
batch_commands << [ :execute_query, "start person_n=node:person(ssn = '000-00-0001')
set bar = {foo}",
{ :other => "what" }
]

# this does raise error
@neo.execute_query("start person_n=node:person(ssn = '000-00-0001')
set bar = {foo}",
{ :other => "what" })

batch_result = @neo.batch *batch_commands
end
end

end

0 comments on commit 7b87efb

Please sign in to comment.