Skip to content

Commit a5db9ef

Browse files
committed
[DSL] Minor tweaks to DSL spec
1 parent fd80c8e commit a5db9ef

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spec/elasticsearch/dsl/search_spec.rb

+2-6
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,10 @@ def aggregation_name
158158

159159
let(:s) do
160160

161-
def term_field
162-
:color
163-
end
164-
165161
def not_clause(obj)
166162
obj.instance_eval do
167163
_not do
168-
term term_field => 'red'
164+
term color: 'red'
169165
end
170166
end
171167
end
@@ -272,7 +268,7 @@ def bool_query(obj)
272268
end
273269
end
274270

275-
it 'finds the correct bindings' do
271+
it 'allows the subquery to be defined on the calling scope' do
276272
expect(my_search.to_hash).to eq(query: { bool: { filter: [{ term: { foo: 'bar' } }],
277273
must: [{ match: { foo: 'bar' } }] } })
278274
end

0 commit comments

Comments
 (0)