Merge tag 'v3.0.1'
This commit is contained in:
commit
87de0ed9e1
1033 changed files with 32983 additions and 15882 deletions
|
|
@ -31,6 +31,36 @@ RSpec.describe ActivityPub::Activity::Follow do
|
|||
end
|
||||
end
|
||||
|
||||
context 'silenced account following an unlocked account' do
|
||||
before do
|
||||
sender.touch(:silenced_at)
|
||||
subject.perform
|
||||
end
|
||||
|
||||
it 'does not create a follow from sender to recipient' do
|
||||
expect(sender.following?(recipient)).to be false
|
||||
end
|
||||
|
||||
it 'creates a follow request' do
|
||||
expect(sender.requested?(recipient)).to be true
|
||||
end
|
||||
end
|
||||
|
||||
context 'unlocked account muting the sender' do
|
||||
before do
|
||||
recipient.mute!(sender)
|
||||
subject.perform
|
||||
end
|
||||
|
||||
it 'creates a follow from sender to recipient' do
|
||||
expect(sender.following?(recipient)).to be true
|
||||
end
|
||||
|
||||
it 'does not create a follow request' do
|
||||
expect(sender.requested?(recipient)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'locked account' do
|
||||
before do
|
||||
recipient.update(locked: true)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ RSpec.describe ActivityPub::Activity::Update do
|
|||
end
|
||||
|
||||
let(:actor_json) do
|
||||
ActiveModelSerializers::SerializableResource.new(modified_sender, serializer: ActivityPub::ActorSerializer, key_transform: :camel_lower).as_json
|
||||
ActiveModelSerializers::SerializableResource.new(modified_sender, serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter).as_json
|
||||
end
|
||||
|
||||
let(:json) do
|
||||
|
|
|
|||
|
|
@ -143,12 +143,6 @@ RSpec.describe ActivityPub::TagManager do
|
|||
expect(subject.uri_to_resource(OStatus::TagManager.instance.uri_for(status), Status)).to eq status
|
||||
end
|
||||
|
||||
it 'returns the local status for OStatus StreamEntry URL' do
|
||||
status = Fabricate(:status)
|
||||
stream_entry_url = account_stream_entry_url(status.account, status.stream_entry)
|
||||
expect(subject.uri_to_resource(stream_entry_url, Status)).to eq status
|
||||
end
|
||||
|
||||
it 'returns the remote status by matching URI without fragment part' do
|
||||
status = Fabricate(:status, uri: 'https://example.com/123')
|
||||
expect(subject.uri_to_resource('https://example.com/123#456', Status)).to eq status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue