diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-07-13 00:19:47 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-07-16 02:38:27 +0300 |
commit | 2e9d53586874a83cea7e7d29a49bde1180e15829 (patch) | |
tree | 8118f6c65c9b610f143e34f8b6a1e8f252065ec4 /app/models/service.rb | |
parent | 2d96c66d63d480f24fd023fe73bf95e67d5ad257 (diff) |
Allow build email service to be tested
Diffstat (limited to 'app/models/service.rb')
-rw-r--r-- | app/models/service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index d7a32c28267..5432f8c7ab4 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -76,6 +76,10 @@ class Service < ActiveRecord::Base [] end + def test_data(project, user) + Gitlab::PushDataBuilder.build_sample(project, user) + end + def supported_events %w(push tag_push issue merge_request wiki_page) end @@ -94,6 +98,11 @@ class Service < ActiveRecord::Base !project.empty_repo? end + # reason why service cannot be tested + def disabled_title + "Please setup a project repository." + end + # Provide convenient accessor methods # for each serialized property. # Also keep track of updated properties in a similar way as ActiveModel::Dirty |