Skip to content
Snippets Groups Projects
Commit 86ef8221 authored by Mayra Cabrera's avatar Mayra Cabrera
Browse files

Makes CommitStatus and GenericCommitStatus respond to presentable

methods

Includes Presentable module into CommitStatus. This fixes presenter
methods being called on those classes.

Closes #46177
parent bdf279b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,6 +2,7 @@ class CommitStatus < ActiveRecord::Base
include HasStatus
include Importable
include AfterCommitQueue
include Presentable
 
self.table_name = 'ci_builds'
 
Loading
Loading
class CommitStatusPresenter < Ci::BuildPresenter
end
class GenericCommitStatusPresenter < CommitStatusPresenter
end
Loading
Loading
@@ -565,4 +565,13 @@ describe CommitStatus do
it_behaves_like 'commit status enqueued'
end
end
describe '#present' do
let(:generic_commit_status) { create(:generic_commit_status) }
it 'returns a presenter' do
expect(commit_status.present).to be_a(Ci::BuildPresenter)
expect(generic_commit_status.present).to be_a(Ci::BuildPresenter)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment