From 911cc144815babf83ddf99f2daa3682021d401b8 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 1 Dec 2019 17:25:29 +0100 Subject: Add follow_request notification type (#12198) * Add follow_request notification type The notification type already existed in the backend but was never pushed to the front-end. This also means translation strings were also available for the backend, from the notification mailer. Unlike other notification types, these are off by default, to match what I remember of Gargron's view on the topic: that follow requests should not clutter notifications and should instead be reviewed at the user's own leisure in the dedicated column. Since follow requests have their own column, I've deemed it unnecessary to add a specific tab for them in the notification quick filter. * Show follow request link in single-column if there are pending requests, even if account isn't locked * Push follow requests from notifications to the follow_requests list * Offer to accept or reject follow request from the notification * Redesign follow request notification --- spec/models/notification_spec.rb | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'spec') diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index 59c582cde..d2e676ec2 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -34,32 +34,6 @@ RSpec.describe Notification, type: :model do end end - describe '#browserable?' do - let(:notification) { Fabricate(:notification) } - - subject { notification.browserable? } - - context 'type is :follow_request' do - before do - allow(notification).to receive(:type).and_return(:follow_request) - end - - it 'returns false' do - is_expected.to be false - end - end - - context 'type is not :follow_request' do - before do - allow(notification).to receive(:type).and_return(:else) - end - - it 'returns true' do - is_expected.to be true - end - end - end - describe '#type' do it 'returns :reblog for a Status' do notification = Notification.new(activity: Status.new) -- cgit From e598ce0bd9dea9b8e0f9fe26a1d78b8ca4838e22 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Tue, 3 Dec 2019 03:55:08 +0900 Subject: Move rspec examples to tmp dir (#12539) --- .cache/.gitkeep | 0 spec/spec_helper.rb | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .cache/.gitkeep (limited to 'spec') diff --git a/.cache/.gitkeep b/.cache/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e57349cc8..b6d127a08 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,7 +12,7 @@ end gc_counter = -1 RSpec.configure do |config| - config.example_status_persistence_file_path = ".cache/rspec" + config.example_status_persistence_file_path = "tmp/rspec/examples.txt" config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end -- cgit