Per-user reblog hiding implementation/fixes/tests
Note that this will only hide/show *future* reblogs by a user, and does nothing to remove/add reblogs that are already in the timeline. I don't think that's a particularly confusing behavior, and it's a lot easier to implement (similar to mutes, I believe).
This commit is contained in:
@@ -48,6 +48,26 @@ RSpec.describe NotifyService do
|
||||
is_expected.to_not change(Notification, :count)
|
||||
end
|
||||
|
||||
describe 'reblogs' do
|
||||
let(:status) { Fabricate(:status, account: Fabricate(:account)) }
|
||||
let(:activity) { Fabricate(:status, account: sender, reblog: status) }
|
||||
|
||||
it 'shows reblogs by default' do
|
||||
recipient.follow!(sender)
|
||||
is_expected.to change(Notification, :count)
|
||||
end
|
||||
|
||||
it 'shows reblogs when explicitly enabled' do
|
||||
recipient.follow!(sender, reblogs: true)
|
||||
is_expected.to change(Notification, :count)
|
||||
end
|
||||
|
||||
it 'hides reblogs when disabled' do
|
||||
recipient.follow!(sender, reblogs: false)
|
||||
is_expected.to_not change(Notification, :count)
|
||||
end
|
||||
end
|
||||
|
||||
context do
|
||||
let(:asshole) { Fabricate(:account, username: 'asshole') }
|
||||
let(:reply_to) { Fabricate(:status, account: asshole) }
|
||||
|
Reference in New Issue
Block a user