Remove superfluous specs
Neither `if` nor `ENV` need to be tested by us...
This commit is contained in:
parent
a2a93d422d
commit
200d188af2
2 changed files with 0 additions and 46 deletions
|
|
@ -33,46 +33,5 @@ describe ApplicationController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,6 @@ describe ApplicationHelper, type: :helper do
|
||||||
expect(nav_root_link_for(nil)).to match 'OSEM'
|
expect(nav_root_link_for(nil)).to match 'OSEM'
|
||||||
end
|
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
|
it 'should use the conference organization name' do
|
||||||
expect(nav_root_link_for(conference)).to match h(conference.organization.name)
|
expect(nav_root_link_for(conference)).to match h(conference.organization.name)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue