0
0
Fork 0

Fix Lint/UselessAssignment cop (#27472)

This commit is contained in:
Matt Jankowski 2023-10-19 10:55:06 -04:00 committed by GitHub
parent 7bc8f03162
commit bcd0171e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 22 additions and 50 deletions

View file

@ -356,7 +356,7 @@ RSpec.describe Account do
end
it 'does not return suspended users' do
match = Fabricate(
Fabricate(
:account,
display_name: 'Display Name',
username: 'username',
@ -483,7 +483,7 @@ RSpec.describe Account do
end
it 'does not return non-followed accounts' do
match = Fabricate(
Fabricate(
:account,
display_name: 'A & l & i & c & e',
username: 'username',
@ -495,7 +495,7 @@ RSpec.describe Account do
end
it 'does not return suspended users' do
match = Fabricate(
Fabricate(
:account,
display_name: 'Display Name',
username: 'username',
@ -535,7 +535,7 @@ RSpec.describe Account do
end
it 'does not return suspended users' do
match = Fabricate(
Fabricate(
:account,
display_name: 'Display Name',
username: 'username',

View file

@ -166,7 +166,7 @@ RSpec.describe Status do
describe '#replies_count' do
it 'is the number of replies' do
reply = Fabricate(:status, account: bob, thread: subject)
Fabricate(:status, account: bob, thread: subject)
expect(subject.replies_count).to eq 1
end

View file

@ -63,7 +63,7 @@ RSpec.describe User do
describe 'confirmed' do
it 'returns an array of users who are confirmed' do
unconfirmed_user = Fabricate(:user, confirmed_at: nil)
Fabricate(:user, confirmed_at: nil)
confirmed_user = Fabricate(:user, confirmed_at: Time.zone.now)
expect(described_class.confirmed).to contain_exactly(confirmed_user)
end

View file

@ -37,7 +37,7 @@ RSpec.describe WebauthnCredential do
end
it 'is invalid if already exist a webauthn credential with the same external id' do
existing_webauthn_credential = Fabricate(:webauthn_credential, external_id: '_Typ0ygudDnk9YUVWLQayw')
Fabricate(:webauthn_credential, external_id: '_Typ0ygudDnk9YUVWLQayw')
new_webauthn_credential = Fabricate.build(:webauthn_credential, external_id: '_Typ0ygudDnk9YUVWLQayw')
new_webauthn_credential.valid?
@ -47,7 +47,7 @@ RSpec.describe WebauthnCredential do
it 'is invalid if user already registered a webauthn credential with the same nickname' do
user = Fabricate(:user)
existing_webauthn_credential = Fabricate(:webauthn_credential, user_id: user.id, nickname: 'USB Key')
Fabricate(:webauthn_credential, user_id: user.id, nickname: 'USB Key')
new_webauthn_credential = Fabricate.build(:webauthn_credential, user_id: user.id, nickname: 'USB Key')
new_webauthn_credential.valid?