From bad08fbea2a32655a6d87f2140840c317cea6c80 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Tue, 16 May 2017 12:58:46 -0700 Subject: Move CI access logic into GitAccess --- spec/support/git_http_helpers.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'spec/support') diff --git a/spec/support/git_http_helpers.rb b/spec/support/git_http_helpers.rb index d3d51560a9d..b8289e6c5f1 100644 --- a/spec/support/git_http_helpers.rb +++ b/spec/support/git_http_helpers.rb @@ -52,14 +52,17 @@ module GitHttpHelpers end def git_access_error(error_key) - Gitlab::GitAccess::ERROR_MESSAGES[error_key] + message = Gitlab::GitAccess::ERROR_MESSAGES[error_key] + message || raise("GitAccess error message key '#{error_key}' not found") end def git_access_wiki_error(error_key) - Gitlab::GitAccessWiki::ERROR_MESSAGES[error_key] + message = Gitlab::GitAccessWiki::ERROR_MESSAGES[error_key] + message || raise("GitAccessWiki error message key '#{error_key}' not found") end def change_access_error(error_key) - Gitlab::Checks::ChangeAccess::ERROR_MESSAGES[error_key] + message = Gitlab::Checks::ChangeAccess::ERROR_MESSAGES[error_key] + message || raise("ChangeAccess error message key '#{error_key}' not found") end end -- cgit v1.2.3