beaa635306
Add specs for group level Update entities Update base classes Add groups-centric changes Update plan and review stage Add summary classes Add summary spec Update specs files Add to specs test cases for group Add changelog entry Add group serializer Fix typo Fix typo Add fetching namespace in sql query Update specs Add rubocop fix Add rubocop fix Modify method to be in sync with code review Add counting deploys from subgroup To group summary stage Add subgroups handling In group stage summary Add additional spec Add additional specs Add more precise inheritance Add attr reader to group level Fix rubocop offence Fix problems with specs Add cr remarks Renaming median method and a lot of calls in specs Move spec setup Rename method in specs Add code review remarks regarding module Add proper module name
30 lines
721 B
Ruby
30 lines
721 B
Ruby
require 'spec_helper'
|
|
|
|
describe AnalyticsIssueSerializer do
|
|
subject do
|
|
described_class
|
|
.new(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,
|
|
name: project.name,
|
|
path: project.namespace
|
|
}
|
|
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
|