diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-07-10 08:11:04 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-07-10 08:11:04 +0000 |
commit | d79cef3a9a5577765d975326fbf4bc1b8c5634de (patch) | |
tree | fad8dce6f89102fda75f511dee80b7fae7675994 /spec/serializers | |
parent | ca1deb9e5ec1429a65d73b3352d1207301f9fc6f (diff) | |
download | gitlab-ce-d79cef3a9a5577765d975326fbf4bc1b8c5634de.tar.gz |
Support manually stopping any environment from the UI
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/environment_entity_spec.rb | 3 | ||||
-rw-r--r-- | spec/serializers/environment_serializer_spec.rb | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/spec/serializers/environment_entity_spec.rb b/spec/serializers/environment_entity_spec.rb index 8f32c5639a1..b7324a26ed2 100644 --- a/spec/serializers/environment_entity_spec.rb +++ b/spec/serializers/environment_entity_spec.rb @@ -1,8 +1,9 @@ require 'spec_helper' describe EnvironmentEntity do + let(:request) { double('request') } let(:entity) do - described_class.new(environment, request: double) + described_class.new(environment, request: spy('request')) end let(:environment) { create(:environment) } diff --git a/spec/serializers/environment_serializer_spec.rb b/spec/serializers/environment_serializer_spec.rb index ca9b520fb38..0f0ab5ac796 100644 --- a/spec/serializers/environment_serializer_spec.rb +++ b/spec/serializers/environment_serializer_spec.rb @@ -54,7 +54,9 @@ describe EnvironmentSerializer do context 'when representing environments within folders' do let(:serializer) do - described_class.new(project: project).within_folders + described_class + .new(current_user: user, project: project) + .within_folders end let(:resource) { Environment.all } @@ -123,7 +125,8 @@ describe EnvironmentSerializer do let(:pagination) { { page: 1, per_page: 2 } } let(:serializer) do - described_class.new(project: project) + described_class + .new(current_user: user, project: project) .with_pagination(request, response) end @@ -169,7 +172,8 @@ describe EnvironmentSerializer do context 'when grouping environments within folders' do let(:serializer) do - described_class.new(project: project) + described_class + .new(current_user: user, project: project) .with_pagination(request, response) .within_folders end |