Add quotes to fix push_rules_spec

parent 64cc235e
...@@ -55,7 +55,7 @@ module QA ...@@ -55,7 +55,7 @@ module QA
expect_error_on_push(file: large_file, expect_error_on_push(file: large_file,
error: 'File "file" is larger than the allowed size of 1 MB') error: 'File "file" is larger than the allowed size of 1 MB')
expect_error_on_push(file: wrongly_named_file, expect_error_on_push(file: wrongly_named_file,
error: Regexp.escape("File name #{@file_name_limitation} was prohibited by the pattern #{@file_name_limitation}")) error: Regexp.escape(%Q{File name #{@file_name_limitation} was prohibited by the pattern "#{@file_name_limitation}"}))
end end
it 'restricts users by email format', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/652' do it 'restricts users by email format', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/652' do
...@@ -86,7 +86,7 @@ module QA ...@@ -86,7 +86,7 @@ module QA
}] }]
expect_error_on_push(file: secret_file, expect_error_on_push(file: secret_file,
error: Regexp.escape('File name id_rsa was prohibited by the pattern id_rsa$')) error: Regexp.escape('File name id_rsa was prohibited by the pattern "id_rsa$"'))
end end
it 'restricts removal of tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/650' do it 'restricts removal of tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/650' do
...@@ -167,9 +167,9 @@ module QA ...@@ -167,9 +167,9 @@ module QA
def standard_file def standard_file
[{ [{
name: 'file', name: 'file',
content: SecureRandom.hex(100) content: SecureRandom.hex(100)
}] }]
end end
def push(commit_message:, branch:, file:, user:, tag:, gpg:) def push(commit_message:, branch:, file:, user:, tag:, gpg:)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment