From 200d188af27b72a4a7f27dc0b278e99a93907f39 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 6 May 2022 14:23:11 +0200 Subject: [PATCH] Remove superfluous specs Neither `if` nor `ENV` need to be tested by us... --- .../application_controller_spec.rb | 41 ------------------- spec/helpers/application_helper_spec.rb | 5 --- 2 files changed, 46 deletions(-) diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 8ebf4a40..87b38e35 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -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 diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index bf73b734..5a036ebc 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -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