From 2b1f1f748b98df621bde7b80952d5e5ebb60f959 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 7 Aug 2019 16:49:32 +0200 Subject: [PATCH] Remove bugherd specs I don't think these are worth the time it takes to execute them every time but most importantly I believe we are not using Bugherd anymore. --- .../consumer/external_services_spec.rb | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 spec/features/consumer/external_services_spec.rb diff --git a/spec/features/consumer/external_services_spec.rb b/spec/features/consumer/external_services_spec.rb deleted file mode 100644 index 7cf1d81f6a..0000000000 --- a/spec/features/consumer/external_services_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'spec_helper' - -feature 'External services' do - include AuthenticationWorkflow - include WebHelper - - describe "bugherd" do - describe "limiting inclusion by environment" do - before { Spree::Config.bugherd_api_key = 'abc123' } - - it "is not included in test" do - visit root_path - expect(script_content(with: 'bugherd')).to be_nil - end - - it "is not included in dev" do - allow(Rails.env).to receive(:development?) { true } - visit root_path - expect(script_content(with: 'bugherd')).to be_nil - end - - it "is included in staging" do - allow(Rails.env).to receive(:staging?) { true } - visit root_path - expect(script_content(with: 'bugherd')).not_to be_nil - end - - it "is included in production" do - allow(Rails.env).to receive(:production?) { true } - visit root_path - expect(script_content(with: 'bugherd')).not_to be_nil - end - end - - context "in an environment where BugHerd is displayed" do - before { allow(Rails.env).to receive(:staging?) { true } } - - context "when there is no API key set" do - before { Spree::Config.bugherd_api_key = nil } - - it "does not include the BugHerd script" do - visit root_path - expect(script_content(with: 'bugherd')).to be_nil - end - end - - context "when an API key is set" do - before { Spree::Config.bugherd_api_key = 'abc123' } - - it "includes the BugHerd script, with the correct API key" do - visit root_path - expect(script_content(with: 'bugherd')).to include 'abc123' - end - end - end - end -end