aboutsummaryrefslogtreecommitdiff
path: root/test/integration_test_helper.rb
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-04-03 07:52:00 +0100
committerChristopher Baines <mail@cbaines.net>2018-04-03 21:58:55 +0100
commit9e622112a80f493eab53420d7dafedb9dd10a612 (patch)
tree6a21d19f6ff7ae72db8510f8e0ae813bb8a49045 /test/integration_test_helper.rb
parenta29946a593988003cbd4637293c5b4cc1aee7eaa (diff)
downloadgovuk-mini-environment-admin-9e622112a80f493eab53420d7dafedb9dd10a612.tar
govuk-mini-environment-admin-9e622112a80f493eab53420d7dafedb9dd10a612.tar.gz
Improve the test suite
Add some tests, and setup the helpers. For some reason, directly running the test files requires the ugly `ENV['RAILS_ENV'] = 'test'` line at the top of the test_helper.rb file.
Diffstat (limited to 'test/integration_test_helper.rb')
-rw-r--r--test/integration_test_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration_test_helper.rb b/test/integration_test_helper.rb
new file mode 100644
index 0000000..986d8a7
--- /dev/null
+++ b/test/integration_test_helper.rb
@@ -0,0 +1,7 @@
+require_relative 'test_helper'
+
+class ActionDispatch::IntegrationTest
+ def login_as(user)
+ GDS::SSO.test_user = user
+ end
+end