|
|
@ -89,10 +89,30 @@ describe InstancePresenter do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
describe '#source_url' do
|
|
|
|
describe '#source_url' do
|
|
|
|
it 'returns "https://github.com/mastodon/mastodon"' do
|
|
|
|
context 'with the GITHUB_REPOSITORY env variable set' do
|
|
|
|
|
|
|
|
around do |example|
|
|
|
|
|
|
|
|
ClimateControl.modify GITHUB_REPOSITORY: 'other/repo' do
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it 'uses the env variable to build a repo URL' do
|
|
|
|
|
|
|
|
expect(instance_presenter.source_url).to eq('https://github.com/other/repo')
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context 'without the GITHUB_REPOSITORY env variable set' do
|
|
|
|
|
|
|
|
around do |example|
|
|
|
|
|
|
|
|
ClimateControl.modify GITHUB_REPOSITORY: nil do
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it 'defaults to the core mastodon repo URL' do
|
|
|
|
expect(instance_presenter.source_url).to eq('https://github.com/mastodon/mastodon')
|
|
|
|
expect(instance_presenter.source_url).to eq('https://github.com/mastodon/mastodon')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
describe '#thumbnail' do
|
|
|
|
describe '#thumbnail' do
|
|
|
|
it 'returns SiteUpload' do
|
|
|
|
it 'returns SiteUpload' do
|
|
|
|