blob: 5befc28f4faf3feb8755365d00dc3affc1be2731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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(: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
|