Sha256: 228b700057046ff844ade1b09ab8f6437eb5920be7f194eb10f0cc298119cce3

Contents?: true

Size: 774 Bytes

Versions: 42

Compression:

Stored size: 774 Bytes

Contents

require 'spec_helper'

module CloudSesame
  module Query
    module Node
      describe FilterQuery do
        subject { FilterQuery.new({}) }

        describe '#compile' do
          it 'should compile root' do
            expect(subject.root).to receive(:compile)
            subject.compile
          end
          it 'should return an hash with filter query' do
            expect(subject.compile).to include(filter_query: subject.root.compile )
          end
        end

        describe '#root' do
          it 'should instantiate and return an instance of Root' do
            expect(AST::Root).to receive(:new).with(subject.context).and_call_original
            expect(subject.root).to be_kind_of(AST::Root)
          end
        end

      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
CloudSesame-0.6.8 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.7 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.6 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.5 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.4 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.3 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.2 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.1 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.6.0 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.5 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.4 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.3 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.2 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.1 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.5.0 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.4.6 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.4.5 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.4.4 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.4.3 spec/cloud_sesame/query/node/filter_query_spec.rb
CloudSesame-0.4.2 spec/cloud_sesame/query/node/filter_query_spec.rb