0
0
Fork 0

Autofix Rubocop Style/StringLiterals (#23695)

This commit is contained in:
Nick Schonning 2023-02-18 17:38:14 -05:00 committed by GitHub
parent ac3561098e
commit 81ad6c2e39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 277 additions and 359 deletions

View file

@ -13,15 +13,15 @@ RSpec.describe AccountsHelper, type: :helper do
describe '#display_name' do
it 'uses the display name when it exists' do
account = Account.new(display_name: "Display", username: "Username")
account = Account.new(display_name: 'Display', username: 'Username')
expect(helper.display_name(account)).to eq "Display"
expect(helper.display_name(account)).to eq 'Display'
end
it 'uses the username when display name is nil' do
account = Account.new(display_name: nil, username: "Username")
account = Account.new(display_name: nil, username: 'Username')
expect(helper.display_name(account)).to eq "Username"
expect(helper.display_name(account)).to eq 'Username'
end
end

View file

@ -5,8 +5,8 @@ describe ApplicationHelper do
it 'returns active when on the current page' do
allow(helper).to receive(:current_page?).and_return(true)
result = helper.active_nav_class("/test")
expect(result).to eq "active"
result = helper.active_nav_class('/test')
expect(result).to eq 'active'
end
it 'returns active when on a current page' do
@ -14,14 +14,14 @@ describe ApplicationHelper do
allow(helper).to receive(:current_page?).with('/test').and_return(true)
result = helper.active_nav_class('/foo', '/test')
expect(result).to eq "active"
expect(result).to eq 'active'
end
it 'returns empty string when not on current page' do
allow(helper).to receive(:current_page?).and_return(false)
result = helper.active_nav_class("/test")
expect(result).to eq ""
result = helper.active_nav_class('/test')
expect(result).to eq ''
end
end