gitlab-org--gitlab-foss/spec/serializers/status_entity_spec.rb
Alexis Reigel 1e9c33acd1
remove obsolete favicon related spec
the favicon variations don't need to be tested on the entity anymore, as
they are A) tested in the dedicated `Gitlab::Favicon` and B) they are
created on the client (i.e. the overlays are always the same for all
base favicon variants).
2018-06-05 16:20:24 +02:00

24 lines
695 B
Ruby

require 'spec_helper'
describe StatusEntity do
let(:entity) { described_class.new(status) }
let(:status) do
Gitlab::Ci::Status::Success.new(double('object'), double('user'))
end
before do
allow(status).to receive(:has_details?).and_return(true)
allow(status).to receive(:details_path).and_return('some/path')
end
describe '#as_json' do
subject { entity.as_json }
it 'contains status details' do
expect(subject).to include :text, :icon, :favicon, :label, :group, :tooltip
expect(subject).to include :has_details, :details_path
expect(subject[:favicon]).to match_asset_path('/assets/ci_favicons/favicon_status_success.png')
end
end
end