Remove unused obscured_counter helper method (#35627)

This commit is contained in:
Matt Jankowski 2025-08-01 10:28:45 -04:00 committed by GitHub
parent fba24cc4eb
commit 483da67204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 44 deletions

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'

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) }