From f928c22ff0952cd6a358ae0102aa45c58c2478aa Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 24 Jun 2019 15:04:07 +0300 Subject: Return all runner tags when search is empty Signed-off-by: Dmitriy Zaporozhets --- spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb b/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb index 79d2f9cdb45..c4e6c9cc9f5 100644 --- a/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb +++ b/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb @@ -17,13 +17,13 @@ describe Autocomplete::ActsAsTaggableOn::TagsFinder do context 'filter by search' do context 'with an empty search term' do - it 'returns an empty collection' do - ActsAsTaggableOn::Tag.create!(name: 'tag1') - ActsAsTaggableOn::Tag.create!(name: 'tag2') + it 'returns all tags' do + tag1 = ActsAsTaggableOn::Tag.create!(name: 'tag1') + tag2 = ActsAsTaggableOn::Tag.create!(name: 'tag2') tags = described_class.new(params: { search: '' }).execute - expect(tags).to be_empty + expect(tags).to match_array [tag1, tag2] end end -- cgit v1.2.1