-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from simpsonjulian/user-agent
HTTP User-Agent to inform Neo4j about client versions
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require File.join(File.dirname(__FILE__), '..', 'spec_helper') | ||
|
||
describe Neography::Rest do | ||
before(:each) do | ||
@neo = Neography::Rest.new | ||
end | ||
|
||
it "should not add a content-type header if there's no existing headers" do | ||
@neo.merge_options({}).keys.should == [:parser] | ||
end | ||
|
||
it "should add a content type if there's existing headers" do | ||
@neo.merge_options({:headers => {'Content-Type' => 'foo/bar'}})[:headers].should == | ||
{'Content-Type' => "foo/bar", "User-Agent" => "Neography/#{Neography::VERSION}"} | ||
|
||
end | ||
|
||
|
||
end |