Sha256: d7e909a84b6e75b7117213c1705bab251c2426a1ae7e068b65313b0d95d2b043
Contents?: true
Size: 758 Bytes
Versions: 1
Compression:
Stored size: 758 Bytes
Contents
require "spec_helper" describe "Neo4jrb::Client", :integration => true 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.1-java | spec/inputs/neo4j-client_spec.rb |