From 984516fdc333519370aa5ce16e32da574151d50d Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 3 Jun 2019 11:33:56 +1000 Subject: [PATCH] DEV: security restriction in dev mode broke tests --- spec/rails_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3eb1fb20c03..c5dcc9bd0d2 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -78,6 +78,10 @@ SiteSetting.automatically_download_gravatars = false SeedFu.seed +# we need this env var to ensure that we can impersonate in test +# this enable integration_helpers sign_in helper +ENV['DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE'] = '1' + module TestSetup # This is run before each test and before each before_all block def self.test_setup(x = nil)