diff options
Diffstat (limited to 'spec/serializers/build_serializer_spec.rb')
-rw-r--r-- | spec/serializers/build_serializer_spec.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/serializers/build_serializer_spec.rb b/spec/serializers/build_serializer_spec.rb index e6437538328..a8069004e7b 100644 --- a/spec/serializers/build_serializer_spec.rb +++ b/spec/serializers/build_serializer_spec.rb @@ -10,16 +10,20 @@ describe BuildSerializer do subject { serializer.represent(resource) } describe '#represent' do - context 'when used with status' do - let(:serializer) do - described_class.new(user: user) - .only_status + # TODO: + end + + describe '#represent_status' do + context 'when represents only status' do + let(:status) do + Gitlab::Ci::Status::Success.new(double('object'), double('user')) end - let(:resource) { create(:ci_build) } + let(:resource) { create(:ci_build, status: :success) } + + subject { serializer.represent_status(resource) } it 'serializes only status' do - expect(subject[:details][:status]).not_to be_empty - expect(subject[:details].keys.count).to eq 1 + expect(subject[:favicon]).to eq(status.favicon) end end end |