summaryrefslogtreecommitdiff
path: root/spec/services/test_hooks/project_service_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/services/test_hooks/project_service_spec.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/services/test_hooks/project_service_spec.rb')
-rw-r--r--spec/services/test_hooks/project_service_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/services/test_hooks/project_service_spec.rb b/spec/services/test_hooks/project_service_spec.rb
index d97a6f15270..13f863dbbdb 100644
--- a/spec/services/test_hooks/project_service_spec.rb
+++ b/spec/services/test_hooks/project_service_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe TestHooks::ProjectService do
context 'hook with not implemented test' do
it 'returns error message' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Testing not available for this hook' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Testing not available for this hook')
end
end
@@ -60,7 +60,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has notes.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has notes.')
end
it 'executes hook' do
@@ -79,7 +79,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has issues.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has issues.')
end
it 'executes hook' do
@@ -112,7 +112,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has merge requests.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has merge requests.')
end
it 'executes hook' do
@@ -131,7 +131,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has CI jobs.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has CI jobs.')
end
it 'executes hook' do
@@ -150,7 +150,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has CI pipelines.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has CI pipelines.')
end
it 'executes hook' do
@@ -172,12 +172,12 @@ RSpec.describe TestHooks::ProjectService do
allow(project).to receive(:wiki_enabled?).and_return(false)
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the wiki is enabled and has pages.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the wiki is enabled and has pages.')
end
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the wiki is enabled and has pages.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the wiki is enabled and has pages.')
end
it 'executes hook' do
@@ -196,7 +196,7 @@ RSpec.describe TestHooks::ProjectService do
it 'returns error message if not enough data' do
expect(hook).not_to receive(:execute)
- expect(service.execute).to include({ status: :error, message: 'Ensure the project has releases.' })
+ expect(service.execute).to have_attributes(status: :error, message: 'Ensure the project has releases.')
end
it 'executes hook' do