From 5f387995d9ae6f89c93518518233c6d9874f6621 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 24 Dec 2018 19:06:14 +0100 Subject: Limit maximum visibility of local silenced users to unlisted (#9583) Fixes #9580 --- spec/services/post_status_service_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec') diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 349ad861b..8f3552224 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -68,6 +68,13 @@ RSpec.describe PostStatusService, type: :service do expect(status.visibility).to eq "private" end + it 'creates a status with limited visibility for silenced users' do + status = subject.call(Fabricate(:account, silenced: true), 'test', nil, visibility: :public) + + expect(status).to be_persisted + expect(status.visibility).to eq "unlisted" + end + it 'creates a status for the given application' do application = Fabricate(:application) -- cgit