Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 03:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 03:09:37 +0300
commite3bdfa1a13d7e6c92716324c78b5b20c07eeb7c6 (patch)
treee8776263096b027d32d4be5118cccc87b00de2bc /spec/models/service_spec.rb
parentc1a50b8195f4e36fda9b233acbde57a449bcf6c3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/service_spec.rb')
-rw-r--r--spec/models/service_spec.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
index d1a4924c07e..cb8122b6573 100644
--- a/spec/models/service_spec.rb
+++ b/spec/models/service_spec.rb
@@ -104,21 +104,29 @@ describe Service do
describe "Test Button" do
describe '#can_test?' do
+ subject { service.can_test? }
+
let(:service) { create(:service, project: project) }
context 'when repository is not empty' do
let(:project) { create(:project, :repository) }
- it 'returns true' do
- expect(service.can_test?).to be true
- end
+ it { is_expected.to be true }
end
context 'when repository is empty' do
let(:project) { create(:project) }
- it 'returns true' do
- expect(service.can_test?).to be true
+ it { is_expected.to be true }
+ end
+
+ context 'when instance-level service' do
+ Service.available_services_types.each do |service_type|
+ let(:service) do
+ service_type.constantize.new(instance: true)
+ end
+
+ it { is_expected.to be_falsey }
end
end
end