1
0
Fork 0
forked from gitea/nas

Fix RSpec/InstanceVariable cop (#27766)

This commit is contained in:
Matt Jankowski 2023-11-08 10:42:30 -05:00 committed by GitHub
parent 4329616c53
commit 69d00e2721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 97 additions and 124 deletions

View file

@ -648,38 +648,36 @@ describe AccountInteractions do
end
describe 'ignoring reblogs from an account' do
before do
@me = Fabricate(:account, username: 'Me')
@you = Fabricate(:account, username: 'You')
end
let!(:me) { Fabricate(:account, username: 'Me') }
let!(:you) { Fabricate(:account, username: 'You') }
context 'with the reblogs option unspecified' do
before do
@me.follow!(@you)
me.follow!(you)
end
it 'defaults to showing reblogs' do
expect(@me.muting_reblogs?(@you)).to be(false)
expect(me.muting_reblogs?(you)).to be(false)
end
end
context 'with the reblogs option set to false' do
before do
@me.follow!(@you, reblogs: false)
me.follow!(you, reblogs: false)
end
it 'does mute reblogs' do
expect(@me.muting_reblogs?(@you)).to be(true)
expect(me.muting_reblogs?(you)).to be(true)
end
end
context 'with the reblogs option set to true' do
before do
@me.follow!(@you, reblogs: true)
me.follow!(you, reblogs: true)
end
it 'does not mute reblogs' do
expect(@me.muting_reblogs?(@you)).to be(false)
expect(me.muting_reblogs?(you)).to be(false)
end
end
end