aboutsummaryrefslogtreecommitdiff
path: root/test/controllers
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-04-27 10:35:27 +0100
committerChristopher Baines <mail@cbaines.net>2019-04-27 10:35:27 +0100
commit2ee6ce2fb7d0880ea598c35c51f19b6cb55c78c1 (patch)
tree24129d4ca71f04b1608b565d0f722d6b0bd75a5e /test/controllers
parentfaf97f178c9948985c3aaa2e7738ea78f8b52d4e (diff)
downloadgovuk-mini-environment-admin-2ee6ce2fb7d0880ea598c35c51f19b6cb55c78c1.tar
govuk-mini-environment-admin-2ee6ce2fb7d0880ea598c35c51f19b6cb55c78c1.tar.gz
Fix the MiniEnvironmentsControllerTest
There were validation failiures causing the test to fail.
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/mini_environments_controller_test.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/controllers/mini_environments_controller_test.rb b/test/controllers/mini_environments_controller_test.rb
index 8176143..61447ad 100644
--- a/test/controllers/mini_environments_controller_test.rb
+++ b/test/controllers/mini_environments_controller_test.rb
@@ -6,8 +6,24 @@ class MiniEnvironmentsControllerTest < ActionDispatch::IntegrationTest
end
test 'show' do
- MiniEnvironment.create
+ revision = GovukGuix::Revision.create!(
+ commit_hash: 'test-commit-hash',
+ store_path: 'test-store-path'
+ )
- get mini_environment_path
+ mini_environment = MiniEnvironment.create!(
+ govuk_guix_revision: revision,
+ backend: Backends::TerraformLibvirt.create!,
+ signon_users: [
+ {
+ name: 'Test name',
+ email: 'Test email',
+ role: 'Test role',
+ passphrase: 'Test passphrase'
+ }
+ ]
+ )
+
+ get mini_environment_path(mini_environment)
end
end