From e85b8af05183d1048adc4a39bc3d975af153463d Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 9 May 2019 09:40:09 -0500 Subject: Second round of Rspec fixes. --- spec/services/post_status_service_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/services/post_status_service_spec.rb') diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index facbe977f..e120d78e8 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -139,12 +139,11 @@ RSpec.describe PostStatusService, type: :service do status = subject.call(account, text: "test status update") expect(ProcessHashtagsService).to have_received(:new) - expect(hashtags_service).to have_received(:call).with(status) + expect(hashtags_service).to have_received(:call).with(status, nil) end it 'gets distributed' do allow(DistributionWorker).to receive(:perform_async) - allow(Pubsubhubbub::DistributionWorker).to receive(:perform_async) allow(ActivityPub::DistributionWorker).to receive(:perform_async) account = Fabricate(:account) @@ -152,7 +151,6 @@ RSpec.describe PostStatusService, type: :service do status = subject.call(account, text: "test status update") expect(DistributionWorker).to have_received(:perform_async).with(status.id) - expect(Pubsubhubbub::DistributionWorker).to have_received(:perform_async).with(status.stream_entry.id) expect(ActivityPub::DistributionWorker).to have_received(:perform_async).with(status.id) end @@ -191,7 +189,7 @@ RSpec.describe PostStatusService, type: :service do expect(media.reload.status).to eq nil end - it 'does not allow attaching more than 4 files' do + it 'does not allow attaching more than 6 files' do account = Fabricate(:account) expect do @@ -204,6 +202,8 @@ RSpec.describe PostStatusService, type: :service do Fabricate(:media_attachment, account: account), Fabricate(:media_attachment, account: account), Fabricate(:media_attachment, account: account), + Fabricate(:media_attachment, account: account), + Fabricate(:media_attachment, account: account), ].map(&:id), ) end.to raise_error( -- cgit