diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-07 18:46:37 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-07 18:46:37 +0300 |
commit | e4efb135e810046b1f4283db4dfe1b386ef15bad (patch) | |
tree | 4398b740d2f75252b0a425fe2a961de6ee82abfe /spec/serializers/status_entity_spec.rb | |
parent | ad19de19498a1337a242fd67731e59771e65a9d3 (diff) |
Add status entity prototype and expose in pipeline
Diffstat (limited to 'spec/serializers/status_entity_spec.rb')
-rw-r--r-- | spec/serializers/status_entity_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/serializers/status_entity_spec.rb b/spec/serializers/status_entity_spec.rb new file mode 100644 index 00000000000..5afa1c25a42 --- /dev/null +++ b/spec/serializers/status_entity_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe StatusEntity do + let(:entity) do + described_class.new(status) + end + + let(:status) do # TODO, add statuses factory + Gitlab::Ci::Status::Success.new(double('object')) + end + + before do + allow(status).to receive(:has_details?).and_return(true) + allow(status).to receive(:details_path).and_return('some/path') + end + + subject { entity.as_json } + + it 'contains status details' do + expect(subject).to include :text, :icon, :label, :title + expect(subject).to include :has_details + expect(subject).to include :details_path + end +end |