diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 16:45:56 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 16:45:56 +0300 |
commit | 30c73d2d9fd6981b817fc5aec5ae6ea5792a7bbe (patch) | |
tree | 423c4b0cd0a3c234d027e3c69791189aea7b7f21 /app/serializers | |
parent | 6b3f52b46c766e4b6bf085626783a9d2bc34d147 (diff) |
Add controller test for merge requests pipelines API
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/pipeline_serializer.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb index cfa86cc2553..b2de6c5832e 100644 --- a/app/serializers/pipeline_serializer.rb +++ b/app/serializers/pipeline_serializer.rb @@ -1,9 +1,10 @@ class PipelineSerializer < BaseSerializer - entity PipelineEntity class InvalidResourceError < StandardError; end include API::Helpers::Pagination Struct.new('Pagination', :request, :response) + entity PipelineEntity + def represent(resource, opts = {}) if paginated? raise InvalidResourceError unless resource.respond_to?(:page) |