summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-04-27 16:10:49 +0000
committerDouwe Maan <douwe@gitlab.com>2017-04-27 16:10:49 +0000
commitb9eb846b921910acca6da517537e38ce3edea5a2 (patch)
tree9a12e359b9556b73bb59726bd6ef81c25ef7b4a2 /spec/models
parent976b020aa3666ac9f1bd302e5b9bdfbe54f28fac (diff)
parent972440b15dfe2b76670f9bf6f39b8a9dd41589ca (diff)
downloadgitlab-ce-b9eb846b921910acca6da517537e38ce3edea5a2.tar.gz
Merge branch 'remove-invalid-services' into 'master'
Remove invalid services with nil or empty type See merge request !10847
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_services/issue_tracker_service_spec.rb2
-rw-r--r--spec/models/service_spec.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/spec/models/project_services/issue_tracker_service_spec.rb b/spec/models/project_services/issue_tracker_service_spec.rb
index fbe6f344a98..869b25b933b 100644
--- a/spec/models/project_services/issue_tracker_service_spec.rb
+++ b/spec/models/project_services/issue_tracker_service_spec.rb
@@ -8,7 +8,7 @@ describe IssueTrackerService, models: true do
let(:service) { RedmineService.new(project: project, active: true) }
before do
- create(:service, project: project, active: true, category: 'issue_tracker')
+ create(:custom_issue_tracker_service, project: project)
end
context 'when service is changed manually by user' do
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
index 0e2f07e945f..4d0181ca297 100644
--- a/spec/models/service_spec.rb
+++ b/spec/models/service_spec.rb
@@ -6,6 +6,10 @@ describe Service, models: true do
it { is_expected.to have_one :service_hook }
end
+ describe 'Validations' do
+ it { is_expected.to validate_presence_of(:type) }
+ end
+
describe "Test Button" do
before do
@service = Service.new