gitlab-org--gitlab-foss/spec/serializers/analytics_issue_serializer_spec.rb
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00

28 lines
688 B
Ruby

require 'spec_helper'
describe AnalyticsIssueSerializer do
subject do
described_class
.new(project: project, entity: :merge_request)
.represent(resource)
end
let(:user) { create(:user) }
let(:project) { create(:empty_project) }
let(:resource) do
{
total_time: "172802.724419",
title: "Eos voluptatem inventore in sed.",
iid: "1",
id: "1",
created_at: "2016-11-12 15:04:02.948604",
author: user
}
end
context 'when there is a single object provided' do
it 'contains important elements of the issue' do
expect(subject).to include(:title, :iid, :created_at, :total_time, :url, :author)
end
end
end