Merge remote-tracking branch 'parent/main' into upstream-20240531
This commit is contained in:
commit
13ad383039
101 changed files with 1486 additions and 1232 deletions
|
@ -309,6 +309,19 @@ RSpec.describe NotifyService do
|
|||
expect(subject.filter?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the sender is mentioned in an unrelated message chain' do
|
||||
before do
|
||||
original_status = Fabricate(:status, visibility: :direct)
|
||||
intermediary_status = Fabricate(:status, visibility: :direct, thread: original_status)
|
||||
notification.target_status.update(thread: intermediary_status)
|
||||
Fabricate(:mention, status: original_status, account: notification.from_account)
|
||||
end
|
||||
|
||||
it 'returns true' do
|
||||
expect(subject.filter?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -586,14 +586,15 @@ RSpec.describe PostStatusService do
|
|||
expect(media.reload.status).to be_nil
|
||||
end
|
||||
|
||||
it 'does not allow attaching more than 4 files' do
|
||||
it 'does not allow attaching more files than configured limit' do
|
||||
stub_const('Status::MEDIA_ATTACHMENTS_LIMIT', 1)
|
||||
account = Fabricate(:account)
|
||||
|
||||
expect do
|
||||
subject.call(
|
||||
account,
|
||||
text: 'test status update',
|
||||
media_ids: Array.new(5) { Fabricate(:media_attachment, account: account) }.map(&:id)
|
||||
media_ids: Array.new(2) { Fabricate(:media_attachment, account: account) }.map(&:id)
|
||||
)
|
||||
end.to raise_error(
|
||||
Mastodon::ValidationError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue