gitlab-org--gitlab-foss/spec/serializers/status_entity_spec.rb

24 lines
583 B
Ruby
Raw Normal View History

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
2017-03-06 10:09:48 -05:00
expect(subject).to include :text, :icon, :favicon, :label, :group
expect(subject).to include :has_details, :details_path
end
end
end