From 33a71e8f7cd28aad5aa690a6d77aa83fe289f69c Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 30 Oct 2018 00:47:31 +0100 Subject: Do not hide boost notifications from followed people with hidden boosts (#9147) * Do not hide boost notifications from followed people with hidden boosts Not displaying boosts from a followed user in the Home timeline and not having notifications when they reblog your own content are two very separate concerns, tying them together seem counter-intuitive and unwanted. * Update specs accordingly --- spec/services/notify_service_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/services') diff --git a/spec/services/notify_service_spec.rb b/spec/services/notify_service_spec.rb index d34667943..39a681abb 100644 --- a/spec/services/notify_service_spec.rb +++ b/spec/services/notify_service_spec.rb @@ -104,9 +104,9 @@ RSpec.describe NotifyService, type: :service do 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) + it 'shows reblogs when disabled' do + recipient.follow!(sender, reblogs: true) + is_expected.to change(Notification, :count) end end -- cgit From 48be335f4f64c5513bb4b0d760225ceca78416c2 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 12:46:05 +0100 Subject: Remove duplicate and outdated specs --- spec/services/notify_service_spec.rb | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'spec/services') diff --git a/spec/services/notify_service_spec.rb b/spec/services/notify_service_spec.rb index 30214030e..7bfca7fb5 100644 --- a/spec/services/notify_service_spec.rb +++ b/spec/services/notify_service_spec.rb @@ -47,26 +47,6 @@ RSpec.describe NotifyService, type: :service do recipient.update(suspended: true) 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 'for direct messages' do let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender, visibility: :direct)) } -- cgit