Reduce `RSpec/MultipleExpectations` in ap/activity/create spec (#29224)

This commit is contained in:
Matt Jankowski 2024-02-16 02:43:00 -05:00 committed by GitHub
parent 1df2ffc3ee
commit ed4939296a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 6 deletions

View File

@ -970,12 +970,15 @@ RSpec.describe ActivityPub::Activity::Create do
it 'creates an encrypted message' do it 'creates an encrypted message' do
encrypted_message = target_device.encrypted_messages.reload.first encrypted_message = target_device.encrypted_messages.reload.first
expect(encrypted_message).to_not be_nil expect(encrypted_message)
expect(encrypted_message.from_device_id).to eq '1234' .to be_present
expect(encrypted_message.from_account).to eq sender .and have_attributes(
expect(encrypted_message.type).to eq 1 from_device_id: eq('1234'),
expect(encrypted_message.body).to eq 'Foo' from_account: eq(sender),
expect(encrypted_message.digest).to eq 'Foo123' type: eq(1),
body: eq('Foo'),
digest: eq('Foo123')
)
end end
it 'creates a message franking' do it 'creates a message franking' do