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/environment_serializer_spec.rb | |
parent | 256a7735f8cb8872a7f7595590300e2fd952428e (diff) |
Return serializable hash from a represented serializer
Diffstat (limited to 'spec/serializers/environment_serializer_spec.rb')
-rw-r--r-- | spec/serializers/environment_serializer_spec.rb | 9 |
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', |