Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with Batch query interface #90

Merged
merged 2 commits into from
Apr 12, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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