File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
elasticsearch-dsl/spec/elasticsearch/dsl/search Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 3535 context 'when an object instance is provided' do
3636
3737 let ( :search ) do
38- described_class . new . must ( Elasticsearch ::DSL ::Search ::Queries ::Term . new foo : 'bar' )
38+ described_class . new . must ( Elasticsearch ::DSL ::Search ::Filters ::Term . new foo : 'bar' )
3939 end
4040
41- it 'executes the block ' do
41+ it 'applies the condition ' do
4242 expect ( search . to_hash ) . to eq ( bool : { must : [ { term : { foo : 'bar' } } ] } )
4343 end
4444
4545 context 'when the block calls multiple methods' do
4646
4747 let ( :search ) do
4848 described_class . new do
49- must ( Elasticsearch ::DSL ::Search ::Queries ::Term . new foo : 'bar' )
50- must_not ( Elasticsearch ::DSL ::Search ::Queries ::Term . new moo : 'bam' )
51- should ( Elasticsearch ::DSL ::Search ::Queries ::Term . new xoo : 'bax' )
49+ must ( Elasticsearch ::DSL ::Search ::Filters ::Term . new foo : 'bar' )
50+ must_not ( Elasticsearch ::DSL ::Search ::Filters ::Term . new moo : 'bam' )
51+ should ( Elasticsearch ::DSL ::Search ::Filters ::Term . new xoo : 'bax' )
5252 end
5353 end
5454
6565
6666 let ( :search ) do
6767 described_class . new do
68- must ( Elasticsearch ::DSL ::Search ::Queries ::Term . new foo : 'bar' )
69- must ( Elasticsearch ::DSL ::Search ::Queries ::Term . new moo : 'bam' )
68+ must ( Elasticsearch ::DSL ::Search ::Filters ::Term . new foo : 'bar' )
69+ must ( Elasticsearch ::DSL ::Search ::Filters ::Term . new moo : 'bam' )
7070
71- should ( Elasticsearch ::DSL ::Search ::Queries ::Term . new xoo : 'bax' )
72- should ( Elasticsearch ::DSL ::Search ::Queries ::Term . new zoo : 'baz' )
71+ should ( Elasticsearch ::DSL ::Search ::Filters ::Term . new xoo : 'bax' )
72+ should ( Elasticsearch ::DSL ::Search ::Filters ::Term . new zoo : 'baz' )
7373 end
7474 end
7575
Original file line number Diff line number Diff line change 3838 described_class . new . must ( Elasticsearch ::DSL ::Search ::Queries ::Match . new foo : 'bar' )
3939 end
4040
41- it 'executes the block ' do
41+ it 'applies the condition ' do
4242 expect ( search . to_hash ) . to eq ( bool : { must : [ { match : { foo : 'bar' } } ] } )
4343 end
4444
You can’t perform that action at this time.
0 commit comments