Add coverage for `StatusesHelper#media_summary` method (#31726)

This commit is contained in:
Matt Jankowski 2024-09-03 11:34:09 -04:00 committed by GitHub
parent 4682804448
commit 490bdb7944
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,19 @@ describe StatusesHelper do
end
end
describe '#media_summary' do
it 'describes the media on a status' do
status = Fabricate :status
Fabricate :media_attachment, status: status, type: :video
Fabricate :media_attachment, status: status, type: :audio
Fabricate :media_attachment, status: status, type: :image
result = helper.media_summary(status)
expect(result).to eq('Attached: 1 image · 1 video · 1 audio')
end
end
describe 'fa_visibility_icon' do
context 'with a status that is public' do
let(:status) { Status.new(visibility: 'public') }