2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe AnalyticsBuildSerializer do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:resource) { create(:ci_build) }
|
|
|
|
|
|
|
|
subject { described_class.new.represent(resource) }
|
|
|
|
|
|
|
|
context 'when there is a single object provided' do
|
|
|
|
it 'contains important elements of analyticsBuild' do
|
|
|
|
expect(subject)
|
|
|
|
.to include(:name, :branch, :short_sha, :date, :total_time, :url, :author)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|