mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-21 00:29:47 +00:00
Add coverage for StatusesHelper#media_summary
method (#31726)
This commit is contained in:
parent
4682804448
commit
490bdb7944
|
@ -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') }
|
||||
|
|
Loading…
Reference in a new issue