BigW Consortium Gitlab

Commit 86ef8221 by Mayra Cabrera

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
......@@ -2,6 +2,7 @@ class CommitStatus < ActiveRecord::Base
include HasStatus
include Importable
include AfterCommitQueue
include Presentable
self.table_name = 'ci_builds'
......
class CommitStatusPresenter < Ci::BuildPresenter
end
class GenericCommitStatusPresenter < CommitStatusPresenter
end
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment