Skip to content

Commit

Permalink
untested
Browse files Browse the repository at this point in the history
  • Loading branch information
grodowski committed Oct 7, 2023
1 parent 3c0327d commit 2a085b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
private

def check_beta_cookie
redirect_to(bounce_home_index_url) and return if params[:x] != ENV.fetch("BETA_CODE", "beta")
redirect_to(bounce_home_index_url) and return if params[:x] != ENV.fetch("CODE", "beta")

cookies[:beta_sign_in] = { value: 1, expires: 1.year }
end
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/home_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class HomeControllerTest < ActionDispatch::IntegrationTest
test "the truth" do
ApplicationController.any_instance.stubs(:current_user).returns(nil)
ENV['BETA_CODE'] = 'false'
ENV['CODE'] = 'false'
get "/home?x=falsey"
assert_equal 302, status

Expand Down

0 comments on commit 2a085b6

Please sign in to comment.