From 25f02cd93da1b59447ddd22b7e1e18947af959ae Mon Sep 17 00:00:00 2001 From: maxdemarzi Date: Fri, 15 Apr 2011 09:56:49 -0700 Subject: [PATCH] root_node returns same as get_node instead of meta-data --- lib/neography/rest.rb | 2 +- spec/integration/neography_spec.rb | 2 +- spec/integration/rest_node_spec.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/neography/rest.rb b/lib/neography/rest.rb index 2330ed0..278c445 100644 --- a/lib/neography/rest.rb +++ b/lib/neography/rest.rb @@ -54,7 +54,7 @@ def configuration end def get_root - get('/') + get("/node/#{get_id(get('/')["reference_node"])}") end def create_node(*args) diff --git a/spec/integration/neography_spec.rb b/spec/integration/neography_spec.rb index 2784444..30083be 100644 --- a/spec/integration/neography_spec.rb +++ b/spec/integration/neography_spec.rb @@ -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 \ No newline at end of file diff --git a/spec/integration/rest_node_spec.rb b/spec/integration/rest_node_spec.rb index 1beb0b3..49caadf 100644 --- a/spec/integration/rest_node_spec.rb +++ b/spec/integration/rest_node_spec.rb @@ -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