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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 00:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 00:08:59 +0300
commitd466ee5042520ad078fe050cb078d81dc2ebe196 (patch)
tree5648eb1aee8aeff5b5c5ff4669a184fd7676f778 /spec/support
parent6a9d7c009e4e5975a89bcc3e458da4b3ec484bd1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/api_helpers.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/helpers/api_helpers.rb b/spec/support/helpers/api_helpers.rb
index 4bf6a17c03e..44c38df71b0 100644
--- a/spec/support/helpers/api_helpers.rb
+++ b/spec/support/helpers/api_helpers.rb
@@ -40,6 +40,17 @@ module ApiHelpers
end
end
+ def expect_empty_array_response
+ expect_successful_response_with_paginated_array
+ expect(json_response.length).to eq(0)
+ end
+
+ def expect_successful_response_with_paginated_array
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(response).to include_pagination_headers
+ expect(json_response).to be_an Array
+ end
+
def expect_paginated_array_response(items)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers