diff options
Diffstat (limited to 'spec/models/projects/topic_spec.rb')
-rw-r--r-- | spec/models/projects/topic_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/projects/topic_spec.rb b/spec/models/projects/topic_spec.rb index aa3230da1e6..8fc4d11f0d9 100644 --- a/spec/models/projects/topic_spec.rb +++ b/spec/models/projects/topic_spec.rb @@ -56,6 +56,14 @@ RSpec.describe Projects::Topic do end end + describe '#find_by_name_case_insensitive' do + it 'returns topic with case insensitive name' do + %w(topic TOPIC Topic).each do |name| + expect(described_class.find_by_name_case_insensitive(name)).to eq(topic) + end + end + end + describe '#search' do it 'returns topics with a matching name' do expect(described_class.search(topic.name)).to eq([topic]) |