maxdemarzi/neography — Issue #12: Cannot add nodes to an index
Author: HeshamAmiri
Created: 2011-10-16 21:26:43+00:00
State: open

I'm using neography to access Neo4j from rails and I have this test case that keep failing:

require 'spec_helper'

describe Graph do

before(:each) do
@neo = Neography::Rest.new
end

it "add node to index" do
test_index = @neo.create_node_index("test_index")
key = generate_text(6)
value = generate_text
response = @neo.create_node
new_index = @neo.add_node_to_index(test_index, key, value, response)
new_index.should_not be_nil
@neo.remove_node_from_index(test_index, key, value, response)
end

end

The index is created on the server, but no nodes are added, here is the rspec failure:

1) Graph add node to index
Failure/Error: new_index.should_not be_nil
expected: not nil
got: nil
# ./spec/models/graph_spec.rb:39:in `block (2 levels) in '