about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-05-18 10:04:32 +0200
committerThibaut Girka <thib@sitedethib.com>2019-05-18 10:04:32 +0200
commit6e227ecb04ee59b36a47bff7be1f1639b0d9c8da (patch)
treef997699db29bb7e01d03d8ab93b9051ad50d2ef3 /spec/services
parent9ca21e93cc1506d0a3c0cfe450636933c3d2388a (diff)
parenta1519a8ef564ed3773f3a0d1613cbe1c5d6f8459 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/reblog_service_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/reblog_service_spec.rb b/spec/services/reblog_service_spec.rb
index 9e66c6643..9d84c41d5 100644
--- a/spec/services/reblog_service_spec.rb
+++ b/spec/services/reblog_service_spec.rb
@@ -4,10 +4,9 @@ RSpec.describe ReblogService, type: :service do
   let(:alice)  { Fabricate(:account, username: 'alice') }
 
   context 'creates a reblog with appropriate visibility' do
-    let(:bob)               { Fabricate(:account, username: 'bob') }
     let(:visibility)        { :public }
     let(:reblog_visibility) { :public }
-    let(:status)            { Fabricate(:status, account: bob, visibility: visibility) }
+    let(:status)            { Fabricate(:status, account: alice, visibility: visibility) }
 
     subject { ReblogService.new }
 
@@ -22,6 +21,15 @@ RSpec.describe ReblogService, type: :service do
         expect(status.reblogs.first.visibility).to eq 'private'
       end
     end
+
+    describe 'public reblogs of private toots should remain private' do
+      let(:visibility)        { :private }
+      let(:reblog_visibility) { :public }
+
+      it 'reblogs privately' do
+        expect(status.reblogs.first.visibility).to eq 'private'
+      end
+    end
   end
 
   context 'OStatus' do