Skip to content

Commit 35fe29d

Browse files
committed
linting
1 parent 3c87df7 commit 35fe29d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

spec/requests/api/subscriptions_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@
114114

115115
describe 'Cloudflare Turnstile integration' do
116116
let(:request_url) { 'https://challenges.cloudflare.com/turnstile/v0/siteverify' }
117-
117+
118118
before do
119-
allow(Rails.configuration.x.cloudflare_turnstile).to receive(:enabled).and_return(true)
120-
allow(Rails.configuration.x.cloudflare_turnstile).to receive(:secret_key).and_return('test-secret')
119+
allow(Rails.configuration.x.cloudflare_turnstile).to receive_messages(
120+
enabled: true,
121+
secret_key: 'test-secret'
122+
)
121123
end
122124

123125
it 'returns 422 when turnstile token is missing' do
@@ -156,7 +158,7 @@
156158
post(path, params: payload, as: :json)
157159

158160
expect(response).to have_http_status(:ok)
159-
expect(response.parsed_body['ok']).to eq(true)
161+
expect(response.parsed_body['ok']).to be(true)
160162
end
161163
end
162164
end

0 commit comments

Comments
 (0)