diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-11 14:26:03 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-11 14:26:03 +0100 |
commit | ac5b250fab83f5daace9fe99f61fcc33f3a0ed4d (patch) | |
tree | 576611155dc5d08baddb255c39f85770eb249383 | |
parent | 13aef532194059711169ecde60d6c49810a8fd65 (diff) | |
download | gitlab-ce-ac5b250fab83f5daace9fe99f61fcc33f3a0ed4d.tar.gz |
Fix error in Commit to Ci::Commit delegation
-rw-r--r-- | app/models/commit.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/commits_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index ecc396045f0..e96bfee1900 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -10,7 +10,7 @@ class Commit attr_mentionable :safe_message, pipeline: :single_line participant :author, :committer, :notes - delegate :duration, :started_at, :finished_at, :coverage, to: :ci_commit + delegate :duration, :started_at, :finished_at, :coverage, to: :ci_commit, allow_nil: true attr_accessor :project diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 49acc3368f4..4a523365b11 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -34,7 +34,7 @@ describe API::API, api: true do end end - describe "GET /projects:id/repository/commits/:sha" do + describe "GET /projects/:id/repository/commits/:sha" do context "authorized user" do it "should return a commit by sha" do get api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}", user) |