diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 15:02:59 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 15:02:59 +0300 |
commit | 42e3f0fd7888ab8ebe11801e01dd3ca1f33b20cf (patch) | |
tree | 9840de93c579b1a6422144a0352493d45f6978bb /spec/serializers/analytics_issue_serializer_spec.rb | |
parent | 256a7735f8cb8872a7f7595590300e2fd952428e (diff) |
Return serializable hash from a represented serializer
Diffstat (limited to 'spec/serializers/analytics_issue_serializer_spec.rb')
-rw-r--r-- | spec/serializers/analytics_issue_serializer_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/serializers/analytics_issue_serializer_spec.rb b/spec/serializers/analytics_issue_serializer_spec.rb index 6afbb2df35c..2f08958a783 100644 --- a/spec/serializers/analytics_issue_serializer_spec.rb +++ b/spec/serializers/analytics_issue_serializer_spec.rb @@ -1,14 +1,13 @@ require 'spec_helper' describe AnalyticsIssueSerializer do - let(:serializer) do + subject do described_class .new(project: project, entity: :merge_request) .represent(resource) end let(:user) { create(:user) } - let(:json) { serializer.as_json } let(:project) { create(:project) } let(:resource) do { @@ -23,7 +22,7 @@ describe AnalyticsIssueSerializer do context 'when there is a single object provided' do it 'contains important elements of the issue' do - expect(json).to include(:title, :iid, :created_at, :total_time, :url, :author) + expect(subject).to include(:title, :iid, :created_at, :total_time, :url, :author) end end end |