gitlab-org--gitlab-foss/spec/serializers/analytics_build_serializer_spec.rb
2016-11-23 19:56:07 +01:00

18 lines
448 B
Ruby

require 'spec_helper'
describe AnalyticsBuildSerializer do
let(:serializer) do
described_class
.new.represent(resource)
end
let(:json) { serializer.as_json }
let(:resource) { create(:ci_build) }
context 'when there is a single object provided' do
it 'contains important elements of analyticsBuild' do
expect(json)
.to include(:name, :branch, :short_sha, :date, :total_time, :url, :author)
end
end
end