Commit d6036f08aa94fa5a45b569fc8b9e80f064496bcf
1 parent
ce84e3f4
Exists in
master
and in
4 other branches
move activated? method to service
Showing
3 changed files
with
8 additions
and
4 deletions
Show diff stats
app/models/gitlab_ci_service.rb
| ... | ... | @@ -23,10 +23,6 @@ class GitlabCiService < Service |
| 23 | 23 | |
| 24 | 24 | after_save :compose_service_hook, if: :activated? |
| 25 | 25 | |
| 26 | - def activated? | |
| 27 | - active | |
| 28 | - end | |
| 29 | - | |
| 30 | 26 | def compose_service_hook |
| 31 | 27 | hook = service_hook || build_service_hook |
| 32 | 28 | hook.url = [project_url, "/build", "?token=#{token}"].join("") | ... | ... |
app/models/service.rb
spec/models/gitlab_ci_service_spec.rb
| ... | ... | @@ -42,5 +42,9 @@ describe GitlabCiService do |
| 42 | 42 | describe :commit_status_path do |
| 43 | 43 | it { @service.commit_status_path("2ab7834c").should == "http://ci.gitlab.org/projects/2/builds/2ab7834c/status.json?token=verySecret"} |
| 44 | 44 | end |
| 45 | + | |
| 46 | + describe :build_page do | |
| 47 | + it { @service.build_page("2ab7834c").should == "http://ci.gitlab.org/projects/2/builds/2ab7834c"} | |
| 48 | + end | |
| 45 | 49 | end |
| 46 | 50 | end | ... | ... |