@@ -154,6 +154,13 @@ def inverse_query_terms(search_string)
154154 it_should_behave_like 'search_filter' , :accept => accept , :reject => reject
155155 end
156156
157+ context 'on a module with a #author of nil' do
158+ let ( :opts ) { ( { 'author' => [ nil ] } ) }
159+ reject = %w( author:foo )
160+
161+ it_should_behave_like 'search_filter' , :reject => reject
162+ end
163+
157164 context 'on a module with the authors "joev" and "blarg"' do
158165 let ( :opts ) { ( { 'author' => [ 'joev' , 'blarg' ] } ) }
159166 accept = %w( author:joev author:joe )
@@ -260,6 +267,22 @@ def inverse_query_terms(search_string)
260267 it_should_behave_like 'search_filter' , accept : accept , reject : reject
261268 end
262269
270+ context 'on a module with a #targets of ["ubuntu", "windows", "osx"]' do
271+ let ( :opts ) { { 'targets' => %w[ ubuntu windows osx ] } }
272+ accept = %w[ targets:osx ]
273+ reject = %w[ targets:unrelated ]
274+
275+ it_should_behave_like 'search_filter' , accept : accept , reject : reject
276+ end
277+
278+ context 'on a module with a #targets of nil' do
279+ let ( :opts ) { { 'targets' => nil } }
280+
281+ reject = %w[ targets:foo ]
282+
283+ it_should_behave_like 'search_filter' , reject : reject
284+ end
285+
263286 context 'on a module that supports the osx platform' do
264287 let ( :opts ) { ( { 'platform' => 'osx' } ) }
265288 accept = %w( platform:osx os:osx )
@@ -387,6 +410,14 @@ def inverse_query_terms(search_string)
387410 end
388411 end
389412
413+ context 'on a module with a #reference of nil' do
414+ let ( :opts ) { { 'references' => nil } }
415+
416+ reject = %w[ reference:foo ]
417+
418+ it_should_behave_like 'search_filter' , reject : reject
419+ end
420+
390421 REF_TYPES . each do |ref_type |
391422 ref_num = '1234-1111'
392423 context "on a module with reference #{ ref_type } -#{ ref_num } " do
0 commit comments