Skip to content

Commit 1c70060

Browse files
committed
Remove remaining Flipflop tests
1 parent 570993a commit 1c70060

2 files changed

Lines changed: 2 additions & 42 deletions

File tree

spec/controllers/catalog_controller_spec.rb

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
end
2626

2727
before do
28-
allow(Flipflop).to receive(:bot_challenge?).and_return(true)
28+
allow(controller).to receive(:bot_challenge?).and_return(true)
2929
end
3030

3131
it "returns the bot challenge before search session tracking" do
@@ -36,34 +36,6 @@
3636
expect(response).to have_http_status(:forbidden)
3737
end
3838

39-
context "with an authenticated user" do
40-
let(:user) { FactoryBot.create(:user) }
41-
42-
before do
43-
sign_in user
44-
end
45-
46-
it "preserves normal catalog access" do
47-
get :index, params: { q: "authenticated user characterization" }
48-
49-
expect(response).to have_http_status(:ok)
50-
end
51-
end
52-
53-
context "with a signed-in guest user" do
54-
let(:guest_user) { FactoryBot.create(:user, guest: true) }
55-
56-
before do
57-
sign_in guest_user
58-
end
59-
60-
it "continues to require the bot challenge" do
61-
get :index, params: { q: "guest user characterization" }
62-
63-
expect(response).to have_http_status(:forbidden)
64-
end
65-
end
66-
6739
context "with a valid bot challenge pass" do
6840
before do
6941
challenge_controller =
@@ -119,18 +91,6 @@
11991
end
12092
end
12193

122-
context "when the Flipflop challenge flag is disabled" do
123-
before do
124-
allow(Flipflop).to receive(:bot_challenge?).and_return(false)
125-
end
126-
127-
it "preserves normal catalog access" do
128-
get :index, params: { q: "disabled challenge characterization" }
129-
130-
expect(response).to have_http_status(:ok)
131-
end
132-
end
133-
13494
context "when the global bot challenge configuration is disabled" do
13595
before do
13696
BotChallengePage::BotChallengePageController

spec/controllers/primo_central_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
before do
3434
allow(helpers).to receive(:current_page?).and_return(false)
35-
allow(Flipflop).to receive(:bot_challenge?).and_return(true)
35+
allow(controller).to receive(:bot_challenge?).and_return(true)
3636
end
3737

3838
it "returns the article bot challenge before search tracking and recaptcha" do

0 commit comments

Comments
 (0)