diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-15 13:03:09 -0500 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-15 14:24:11 -0500 |
commit | 86ef8221778d2aff630feecfa15ba70514983dbc (patch) | |
tree | aa760ef121c74a3c97131963f9c6c0790acf1f15 /spec/models/commit_status_spec.rb | |
parent | bdf279b151c2a530155425f352daac0576f1ec60 (diff) | |
download | gitlab-ce-86ef8221778d2aff630feecfa15ba70514983dbc.tar.gz |
Makes CommitStatus and GenericCommitStatus respond to presentable
methods
Includes Presentable module into CommitStatus. This fixes presenter
methods being called on those classes.
Closes #46177
Diffstat (limited to 'spec/models/commit_status_spec.rb')
-rw-r--r-- | spec/models/commit_status_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 2ed29052dc1..eddcf616b53 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -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 |