You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
544 B

require 'rails_helper'
describe ActivityPub::ThreadResolveWorker do
subject { described_class.new }
let(:status) { Fabricate(:status) }
let(:parent) { Fabricate(:status) }
describe '#perform' do
it 'gets parent from ActivityPub::FetchRemoteStatusService and glues them together' do
allow(ActivityPub::FetchRemoteStatusService).to receive(:new).and_return(double(:service, call: parent))
subject.perform(status.id, 'http://example.com/123')
expect(status.reload.in_reply_to_id).to eq parent.id
end
end
end