diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 2fcbd5ae108..ba57e31f7fe 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -401,4 +401,14 @@ describe Project do it { should eq "http://localhost#{avatar_path}" } end end + + describe :ci_commit do + let(:project) { create :project } + let(:ci_project) { create :ci_project, gl_project: project } + let(:commit) { create :ci_commit, project: ci_project } + + before { project.create_gitlab_ci_service(active: true) } + + it { expect(project.ci_commit(commit.sha)).to eq(commit) } + end end |