Sha256: 93615f909044309152b517a3fb6d0c8e78b1a8e0b472fa584ef0be25fb6e6353
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
require 'spec_helper' describe "Neo4jrb::Client" do let(:path) { "spec/fixtures/graph.db" } let(:client) { Neo4jrb::Client.open(path) } it "can count all nodes within the database" do expect(client.count_nodes).to eq(171) end context "while running a query" do let(:query) { "MATCH (p:`Person`)-->(m:`Movie`) WHERE m.released = 2000 RETURN *" } subject(:resultset) { client.execute_query(query) } it "return the right amount of data" do expect(resultset.count).to eq(24) end it "return the right type of data as array" do resultset.each do |result| result.map! { |e| e.labels.first }.flatten expect(result).to eq([:Movie, :Person]) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-input-neo4j-0.9.0-java | spec/inputs/neo4j-client_spec.rb |