mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 21:21:36 +01:00
Add coverage for StatusesHelper#media_summary
method (#31726)
This commit is contained in:
parent
4682804448
commit
490bdb7944
1 changed files with 13 additions and 0 deletions
|
@ -23,6 +23,19 @@ describe StatusesHelper do
|
||||||
end
|
end
|
||||||
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
|
describe 'fa_visibility_icon' do
|
||||||
context 'with a status that is public' do
|
context 'with a status that is public' do
|
||||||
let(:status) { Status.new(visibility: 'public') }
|
let(:status) { Status.new(visibility: 'public') }
|
||||||
|
|
Loading…
Reference in a new issue