Skip to content

Commit

Permalink
Bump to 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu Kopetz committed Apr 15, 2014
1 parent c56574f commit ee25406
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
v1.4.2
=======

c56574f Add batch_no_streaming method

v1.3.11
=======
Expand Down
41 changes: 41 additions & 0 deletions spec/integration/rest_batch_no_streaming_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require 'spec_helper'

describe Neography::Rest do
before(:each) do
@neo = Neography::Rest.new
end

describe "no streaming" do

it "can send a 1000 item batch" do
commands = []
1000.times do |x|
commands << [:create_node, {"name" => "Max " + x.to_s}]
end
batch_result = @neo.batch_no_streaming *commands
batch_result.first["body"]["data"]["name"].should == "Max 0"
batch_result.last["body"]["data"]["name"].should == "Max 999"
end

it "can send a 5000 item batch" do
commands = []
5000.times do |x|
commands << [:get_node, 0]
end
batch_result = @neo.batch_no_streaming *commands
batch_result.first["body"]["self"].split('/').last.should == "0"
batch_result.last["body"]["self"].split('/').last.should == "0"
end

it "can send a 20000 item batch" do
commands = []
20000.times do |x|
commands << [:create_node, {"name" => "Max " + x.to_s}]
end
batch_result = @neo.batch_no_streaming *commands
batch_result.first["body"]["data"]["name"].should == "Max 0"
batch_result.last["body"]["data"]["name"].should == "Max 19999"
end
end

end

0 comments on commit ee25406

Please sign in to comment.