Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-11 18:20:24 +0300
committerStan Hu <stanhu@gmail.com>2019-01-11 18:20:24 +0300
commit485974973e45aead6eeff0c86395da8ae2af8d06 (patch)
treef96bc74f97a6b46e9e51d011be5a1324ffed58c9 /spec/support/helpers
parent740871eef86d9b3b72de3e36cd07e1c9c532685f (diff)
parentf216d60bebadf9f4b2aed5df0dc18e2e83865f98 (diff)
Merge branch '9070-refactor-specs' into 'master'
Refactor epics/issues API specs See merge request gitlab-org/gitlab-ce!24302
Diffstat (limited to 'spec/support/helpers')
-rw-r--r--spec/support/helpers/api_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/helpers/api_helpers.rb b/spec/support/helpers/api_helpers.rb
index a57a3b2cf34..4a9ce9beb78 100644
--- a/spec/support/helpers/api_helpers.rb
+++ b/spec/support/helpers/api_helpers.rb
@@ -36,4 +36,11 @@ module ApiHelpers
full_path
end
+
+ def expect_paginated_array_response(items)
+ expect(response).to have_gitlab_http_status(200)
+ expect(response).to include_pagination_headers
+ expect(json_response).to be_an Array
+ expect(json_response.map { |item| item['id'] }).to eq(Array(items))
+ end
end