Skip to content

Commit

Permalink
root_node returns same as get_node instead of meta-data
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Apr 15, 2011
1 parent fdffbdb commit 25f02cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def configuration
end

def get_root
get('/')
get("/node/#{get_id(get('/')["reference_node"])}")
end

def create_node(*args)
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/neography_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
describe "ref_node" do
it "can get the reference node" do
root_node = Neography.ref_node
root_node.should have_key("reference_node")
root_node.should have_key("self")
end
end
end
3 changes: 2 additions & 1 deletion spec/integration/rest_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
describe "get_root" do
it "can get the root node" do
root_node = @neo.get_root
root_node.should have_key("reference_node")
root_node.should have_key("self")
root_node["self"].split('/').last.should == "0"
end
end

Expand Down

0 comments on commit 25f02cd

Please sign in to comment.