Skip to content

Commit

Permalink
Merge pull request #90 from ceterumnet/master
Browse files Browse the repository at this point in the history
Possible issue with Batch query interface
  • Loading branch information
maxdemarzi committed Apr 12, 2013
2 parents fd13a05 + a2cdf54 commit aa6c1ae
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion spec/integration/rest_batch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -452,5 +452,28 @@
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
expect {
@neo.execute_query("start person_n=node:person(ssn = '000-00-0001')
set bar = {foo}",
{ :other => "what" })
}.to raise_exception Neography::SyntaxException

batch_result = @neo.batch *batch_commands
end
end

end

0 comments on commit aa6c1ae

Please sign in to comment.