Sha256: dca233b19d49b83758da8d581b746244bea289b68c3bb45b48b00419cc41dc1a

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'

describe Adapter::Neography do
  let(:neo) { instance_spy(Neography::Rest, execute_query: {'columns' => ['c1', 'c2'], 'data' => [['abc', 1], ['def', 2]]}) }
  let(:adapter) { Adapter::Neography.new(neo) }
  it 'calls Neography' do
    adapter.execute('blah', {some_param: 'test'})
    expect(neo).to have_received(:execute_query).with('blah', {some_param: 'test'})
  end
  it 'transforms result' do
    result = adapter.execute('blah', {some_param: 'test'})
    expect(result).to eq [{c1: 'abc', c2: 1}, {c1: 'def', c2: 2}]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cypher_builder-0.0.5 spec/cypher_builder/adapter/neography_spec.rb
cypher_builder-0.0.4 spec/cypher_builder/adapter/neography_spec.rb
cypher_builder-0.0.3 spec/cypher_builder/adapter/neography_spec.rb
cypher_builder-0.0.2 spec/cypher_builder/adapter/neography_spec.rb