Skip to content

Commit

Permalink
add unmanaged extensions spec (skipped for test suite)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Feb 1, 2014
1 parent b788b68 commit 9a76e11
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions spec/integration/unmanaged_spec.rb
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
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def generate_text(length=8)
end

RSpec.configure do |c|
c.filter_run_excluding :slow => true, :gremlin => true, :reference => true, :neo_is_broken => true
c.filter_run_excluding :slow => true, :gremlin => true, :reference => true, :neo_is_broken => true, :unmanaged_extensions => true
end


Expand Down

0 comments on commit 9a76e11

Please sign in to comment.