Remove unused obscured_counter helper method (#35627)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2025-08-01 14:28:45 +00:00
1 parent fba24cc4eb
commit 483da67204
2 files changed
-44

No files matched your search

-10
View File
@@ -39,16 +39,6 @@ module HomeHelper
end
end
def obscured_counter(count)
if count <= 0
'0'
elsif count == 1
'1'
else
'1+'
end
end
def field_verified_class(verified)
if verified
'verified'
-34
View File
@@ -41,40 +41,6 @@ RSpec.describe HomeHelper do
end
end
describe 'obscured_counter' do
context 'with a value of less than zero' do
let(:count) { -10 }
it 'returns the correct string' do
expect(helper.obscured_counter(count)).to eq '0'
end
end
context 'with a value of zero' do
let(:count) { 0 }
it 'returns the correct string' do
expect(helper.obscured_counter(count)).to eq '0'
end
end
context 'with a value of one' do
let(:count) { 1 }
it 'returns the correct string' do
expect(helper.obscured_counter(count)).to eq '1'
end
end
context 'with a value of more than one' do
let(:count) { 10 }
it 'returns the correct string' do
expect(helper.obscured_counter(count)).to eq '1+'
end
end
end
describe 'field_verified_class' do
subject { helper.field_verified_class(verified) }