-
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.
add unmanaged extensions spec (skipped for test suite)
- Loading branch information
1 parent
b788b68
commit 9a76e11
Showing
2 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'spec_helper' | ||
|
||
describe Neography::Rest do | ||
before(:each) do | ||
@neo = Neography::Rest.new | ||
end | ||
|
||
describe "call unmanaged extensions", :unmanaged_extensions => true do | ||
it "can call a get based unmanaged extension" do | ||
results = @neo.get_extension('/example/service/queries/fofof/13343') | ||
results.should_not be_null | ||
end | ||
|
||
it "can call a POST based unmanaged extension" do | ||
results = @neo.post_extention('/movie/recommend', {"title" => "Rambo"}) | ||
results.should_not be_null | ||
end | ||
|
||
it "can call a POST based unmanaged extension that uses form-urlencoded" do | ||
headers = {'Content-Type' =>'application/x-www-form-urlencoded'} | ||
results = @neo.post_extention('/music/recommend', {"artist" => "Ministry", "song" => "Just one Fix"}, headers) | ||
results.should_not be_null | ||
end | ||
|
||
end | ||
|
||
end |
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