mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-26 15:54:23 +00:00
Add specs for InstancePresenter (#9596)
This commit is contained in:
parent
240c122767
commit
1bc78ec50e
|
@ -111,4 +111,37 @@ describe InstancePresenter do
|
||||||
expect(instance_presenter.domain_count).to eq(345)
|
expect(instance_presenter.domain_count).to eq(345)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#version_number' do
|
||||||
|
it 'returns Mastodon::Version' do
|
||||||
|
expect(instance_presenter.version_number).to be(Mastodon::Version)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#source_url' do
|
||||||
|
it 'returns "https://github.com/tootsuite/mastodon"' do
|
||||||
|
expect(instance_presenter.source_url).to eq('https://github.com/tootsuite/mastodon')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#thumbnail' do
|
||||||
|
it 'returns SiteUpload' do
|
||||||
|
thumbnail = Fabricate(:site_upload, var: 'thumbnail')
|
||||||
|
expect(instance_presenter.thumbnail).to eq(thumbnail)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#hero' do
|
||||||
|
it 'returns SiteUpload' do
|
||||||
|
hero = Fabricate(:site_upload, var: 'hero')
|
||||||
|
expect(instance_presenter.hero).to eq(hero)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#mascot' do
|
||||||
|
it 'returns SiteUpload' do
|
||||||
|
mascot = Fabricate(:site_upload, var: 'mascot')
|
||||||
|
expect(instance_presenter.mascot).to eq(mascot)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue