diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/graphql/mutations/terraform/state/delete_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/graphql/mutations/terraform/state/delete_spec.rb')
-rw-r--r-- | spec/graphql/mutations/terraform/state/delete_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/graphql/mutations/terraform/state/delete_spec.rb b/spec/graphql/mutations/terraform/state/delete_spec.rb index 313a85a4bac..66d4b50741f 100644 --- a/spec/graphql/mutations/terraform/state/delete_spec.rb +++ b/spec/graphql/mutations/terraform/state/delete_spec.rb @@ -34,12 +34,12 @@ RSpec.describe Mutations::Terraform::State::Delete do state.project.add_maintainer(user) end - it 'deletes the state', :aggregate_failures do - expect do - expect(subject).to eq(errors: []) - end.to change { ::Terraform::State.count }.by(-1) + it 'schedules the state for deletion', :aggregate_failures do + expect_next_instance_of(Terraform::States::TriggerDestroyService, state, current_user: user) do |service| + expect(service).to receive(:execute).once.and_return(ServiceResponse.success) + end - expect { state.reload }.to raise_error(ActiveRecord::RecordNotFound) + subject end end |