Skip to content

Commit

Permalink
adding test...
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Jul 26, 2013
1 parent 85ec0d6 commit 5d4e2d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/integration/rest_plugin_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Encoding: utf-8

require 'spec_helper'

describe Neography::Rest do
Expand Down Expand Up @@ -51,6 +53,17 @@
existing_node["data"][0][0]["self"].split('/').last.should == id
end

it "can get a node with a tilde" do
new_node = @neo.create_node("name" => "Ateísmo Sureño")
id = new_node["self"].split('/').last
existing_node = @neo.execute_query("start n=node(#{id}) return n")
existing_node.should_not be_nil
existing_node.should have_key("data")
existing_node.should have_key("columns")
existing_node["data"][0][0]["self"].split('/').last.should == id
existing_node["data"][0][0]["data"]["name"].should == "Ateísmo Sureño"
end

it "can get the a node with a variable" do
new_node = @neo.create_node
id = new_node["self"].split('/').last
Expand Down

0 comments on commit 5d4e2d0

Please sign in to comment.