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.
This commit is contained in:
Pau Perez
2019-08-07 16:49:32 +02:00
parent 6a41d9be87
commit 2b1f1f748b

View File

@@ -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