Skip to content

Commit

Permalink
Fix flaky test in OmniauthIntegrationTest (#1902)
Browse files Browse the repository at this point in the history
Since we added rate limiting for login requests, we need to flush redis before the tests run.
  • Loading branch information
jayjay-w authored May 29, 2024
1 parent a699d1f commit f5d1ae3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/integration/omniauth_integration_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require_relative '../test_helper'

class OmniauthIntegrationTest < ActionDispatch::IntegrationTest
setup do
redis = Redis.new(REDIS_CONFIG)
redis.flushdb
end

test "should close in case of failure" do
get '/api/users/auth/slack/callback', params: { error: 'access_denied' }
assert_redirected_to '/close.html'
Expand Down

0 comments on commit f5d1ae3

Please sign in to comment.