summaryrefslogtreecommitdiff
path: root/spec/serializers/environment_serializer_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-27 13:02:59 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-27 13:02:59 +0100
commit42e3f0fd7888ab8ebe11801e01dd3ca1f33b20cf (patch)
tree9840de93c579b1a6422144a0352493d45f6978bb /spec/serializers/environment_serializer_spec.rb
parent256a7735f8cb8872a7f7595590300e2fd952428e (diff)
downloadgitlab-ce-42e3f0fd7888ab8ebe11801e01dd3ca1f33b20cf.tar.gz
Return serializable hash from a represented serializer
Diffstat (limited to 'spec/serializers/environment_serializer_spec.rb')
-rw-r--r--spec/serializers/environment_serializer_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/serializers/environment_serializer_spec.rb b/spec/serializers/environment_serializer_spec.rb
index b7ed4eb0239..3c37660885d 100644
--- a/spec/serializers/environment_serializer_spec.rb
+++ b/spec/serializers/environment_serializer_spec.rb
@@ -1,16 +1,15 @@
require 'spec_helper'
describe EnvironmentSerializer do
- let(:serializer) do
+ let(:user) { create(:user) }
+ let(:project) { create(:project) }
+
+ let(:json) do
described_class
.new(user: user, project: project)
.represent(resource)
end
- let(:json) { serializer.as_json }
- let(:user) { create(:user) }
- let(:project) { create(:project) }
-
context 'when there is a single object provided' do
before do
create(:ci_build, :manual, name: 'manual1',