Remove superfluous specs

Neither `if` nor `ENV` need to be tested by us...
This commit is contained in:
Henne Vogelsang 2022-05-06 14:23:11 +02:00
parent a2a93d422d
commit 200d188af2
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
2 changed files with 0 additions and 46 deletions

View file

@ -33,46 +33,5 @@ describe ApplicationController, type: :controller do
end
end
end
end
end
describe ApplicationController, type: :request do
let(:conference) { create(:conference) }
describe 'Skylight link' do
around do |example|
original_value = ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL']
example.run
ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL'] = original_value
end
context 'when SKYLIGHT_PUBLIC_DASHBOARD_URL is set' do
before do
ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL'] = 'https://oss.skylight.io/app/applications/my-osem'
end
it 'should include a link to view performance data' do
get '/'
expect(response.body).to match(/Performance data/i)
expect(response.body).to include('https://oss.skylight.io/app/applications/my-osem')
end
end
context 'when SKYLIGHT_PUBLIC_DASHBOARD_URL is not set' do
before do
ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL'] = nil
end
it 'should not include a link to view performance data' do
get '/'
expect(response.body).to_not match(/performance data/i)
expect(response.body).to_not match(/skylight/i)
end
end
end
end

View file

@ -68,11 +68,6 @@ describe ApplicationHelper, type: :helper do
expect(nav_root_link_for(nil)).to match 'OSEM'
end
it 'should use the environment variable' do
ENV['OSEM_NAME'] = Faker::Company.name + "'"
expect(nav_root_link_for(nil)).to match h(ENV['OSEM_NAME'])
end
it 'should use the conference organization name' do
expect(nav_root_link_for(conference)).to match h(conference.organization.name)
end