diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/models/terraform/state_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/models/terraform/state_spec.rb')
-rw-r--r-- | spec/models/terraform/state_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/terraform/state_spec.rb b/spec/models/terraform/state_spec.rb index 608c5bdf03a..ca8fe4cca3b 100644 --- a/spec/models/terraform/state_spec.rb +++ b/spec/models/terraform/state_spec.rb @@ -97,10 +97,11 @@ RSpec.describe Terraform::State do end describe '#update_file!' do - let(:version) { 3 } - let(:data) { Hash[terraform_version: '0.12.21'].to_json } + let_it_be(:build) { create(:ci_build) } + let_it_be(:version) { 3 } + let_it_be(:data) { Hash[terraform_version: '0.12.21'].to_json } - subject { terraform_state.update_file!(CarrierWaveStringFile.new(data), version: version) } + subject { terraform_state.update_file!(CarrierWaveStringFile.new(data), version: version, build: build) } context 'versioning is enabled' do let(:terraform_state) { create(:terraform_state) } @@ -109,6 +110,7 @@ RSpec.describe Terraform::State do expect { subject }.to change { Terraform::StateVersion.count } expect(terraform_state.latest_version.version).to eq(version) + expect(terraform_state.latest_version.build).to eq(build) expect(terraform_state.latest_version.file.read).to eq(data) end end |