From 2ee6ce2fb7d0880ea598c35c51f19b6cb55c78c1 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 27 Apr 2019 10:35:27 +0100 Subject: Fix the MiniEnvironmentsControllerTest There were validation failiures causing the test to fail. --- .../controllers/mini_environments_controller_test.rb | 20 ++++++++++++++++++-- 1 file 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 -- cgit v1.2.3