From 6db7f8366a5509f4426be106ce7a5fb499f0607f Mon Sep 17 00:00:00 2001 From: Javad Karabi Date: Wed, 15 Jan 2014 16:53:17 -0600 Subject: [PATCH] update tests --- spec/integration/rest_header_spec.rb | 2 +- spec/unit/config_spec.rb | 4 +++- spec/unit/connection_spec.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/integration/rest_header_spec.rb b/spec/integration/rest_header_spec.rb index c88188a..8328bfd 100644 --- a/spec/integration/rest_header_spec.rb +++ b/spec/integration/rest_header_spec.rb @@ -8,7 +8,7 @@ it "should add a content type if there's existing headers" do subject.merge_options({:headers => {'Content-Type' => 'foo/bar'}})[:headers].should == - {'Content-Type' => "foo/bar", "User-Agent" => "Neography/#{Neography::VERSION}" , "X-Stream"=>true} + {'Content-Type' => "foo/bar", "User-Agent" => "Neography/#{Neography::VERSION}" , "X-Stream"=>true, "max-execution-time"=>6000} end end diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index b8676fb..9e38b54 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -21,6 +21,7 @@ module Neography its(:username) { should == nil } its(:password) { should == nil } its(:parser) { should == MultiJsonParser} + its(:max_execution_time) { should == 6000 } it "has a hash representation" do expected_hash = { @@ -37,7 +38,8 @@ module Neography :authentication => nil, :username => nil, :password => nil, - :parser => MultiJsonParser + :parser => MultiJsonParser, + :max_execution_time => 6000 } config.to_hash.should == expected_hash end diff --git a/spec/unit/connection_spec.rb b/spec/unit/connection_spec.rb index eeb822e..18e50f2 100644 --- a/spec/unit/connection_spec.rb +++ b/spec/unit/connection_spec.rb @@ -125,7 +125,7 @@ module Neography it "adds the User-Agent to the headers" do connection.client.should_receive(:get).with( "http://localhost:7474/db/data/foo/bar", - nil, { "User-Agent" => "Neography/#{Neography::VERSION}", "X-Stream"=>true} + nil, { "User-Agent" => "Neography/#{Neography::VERSION}", "X-Stream"=>true, "max-execution-time"=>6000} ) { double.as_null_object } connection.get("/foo/bar", :headers => {})