diff options
author | Christopher Baines <mail@cbaines.net> | 2019-04-27 10:36:07 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-04-27 10:36:07 +0100 |
commit | f25d25d1d9e00db43565a48af9458883879b4299 (patch) | |
tree | 710a76e1e0e3072aacb34577fa1593691c072176 | |
parent | 2ee6ce2fb7d0880ea598c35c51f19b6cb55c78c1 (diff) | |
download | govuk-mini-environment-admin-f25d25d1d9e00db43565a48af9458883879b4299.tar govuk-mini-environment-admin-f25d25d1d9e00db43565a48af9458883879b4299.tar.gz |
Use create! in the tests
As this should make finding out about validation errors easier.
3 files changed, 7 insertions, 7 deletions
diff --git a/test/controllers/backends/terraform_aws_controller_test.rb b/test/controllers/backends/terraform_aws_controller_test.rb index f98890f..2815e83 100644 --- a/test/controllers/backends/terraform_aws_controller_test.rb +++ b/test/controllers/backends/terraform_aws_controller_test.rb @@ -38,7 +38,7 @@ class Backends::TerraformAwsControllerTest < ActionDispatch::IntegrationTest end test 'update' do - backend = Backends::TerraformAws.create( + backend = Backends::TerraformAws.create!( label: 'Old label', aws_region: 'old-test-region', aws_access_key_id: 'old-test-access-key-id', @@ -66,7 +66,7 @@ class Backends::TerraformAwsControllerTest < ActionDispatch::IntegrationTest end test 'show' do - backend = Backends::TerraformAws.create( + backend = Backends::TerraformAws.create!( label: 'Test Backend', aws_region: 'old-test-region', aws_access_key_id: 'old-test-access-key-id', @@ -81,7 +81,7 @@ class Backends::TerraformAwsControllerTest < ActionDispatch::IntegrationTest end test 'destroy' do - backend = Backends::TerraformAws.create( + backend = Backends::TerraformAws.create!( label: 'Test Backend', aws_region: 'old-test-region', aws_access_key_id: 'old-test-access-key-id', diff --git a/test/controllers/backends/terraform_libvirt_controller_test.rb b/test/controllers/backends/terraform_libvirt_controller_test.rb index b34a8ac..46ba435 100644 --- a/test/controllers/backends/terraform_libvirt_controller_test.rb +++ b/test/controllers/backends/terraform_libvirt_controller_test.rb @@ -35,7 +35,7 @@ class Backends::TerraformLibvirtControllerTest < ActionDispatch::IntegrationTest end test 'update' do - backend = Backends::TerraformLibvirt.create( + backend = Backends::TerraformLibvirt.create!( label: 'Old label', domain: 'old.domain.example.com', uri: 'old://uri' @@ -56,7 +56,7 @@ class Backends::TerraformLibvirtControllerTest < ActionDispatch::IntegrationTest end test 'show' do - backend = Backends::TerraformLibvirt.create( + backend = Backends::TerraformLibvirt.create!( label: 'Test Backend', domain: 'test.backend.example.com', uri: 'test://uri' @@ -68,7 +68,7 @@ class Backends::TerraformLibvirtControllerTest < ActionDispatch::IntegrationTest end test 'destroy' do - backend = Backends::TerraformLibvirt.create( + backend = Backends::TerraformLibvirt.create!( label: 'Test Backend', domain: 'test.backend.example.com', uri: 'test://uri' diff --git a/test/controllers/govuk_guix/revisions_controller_test.rb b/test/controllers/govuk_guix/revisions_controller_test.rb index 6f08489..a0c4d78 100644 --- a/test/controllers/govuk_guix/revisions_controller_test.rb +++ b/test/controllers/govuk_guix/revisions_controller_test.rb @@ -6,7 +6,7 @@ class GovukGuix::RevisionsControllerTest < ActionDispatch::IntegrationTest end test 'show' do - revision = GovukGuix::Revision.create( + revision = GovukGuix::Revision.create!( commit_hash: 'test-commit-hash', store_path: 'test-store-path' ) |