about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-12-24 19:06:14 +0100
committerEugen Rochko <eugen@zeonfederated.com>2018-12-24 19:06:14 +0100
commit5f387995d9ae6f89c93518518233c6d9874f6621 (patch)
tree980b3337f217028a45b1db840b0c0d2c62dbbfaf /spec
parente25947db4a44cd50fa1daa36d5031a950327b646 (diff)
Limit maximum visibility of local silenced users to unlisted (#9583)
Fixes #9580
Diffstat (limited to 'spec')
-rw-r--r--spec/services/post_status_service_spec.rb7
1 files changed, 7 insertions, 0 deletions
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)