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>2023-06-21 03:07:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-21 03:07:56 +0300
commit6fbaac1974d2e9a0e5296a9da2d99f356a684f91 (patch)
tree965884691ca08bf2c2a00e49a359c30515aaa813 /spec/frontend/lib
parentc972699d3975e61785389602bfc8078d3bc40091 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r--spec/frontend/lib/utils/ref_validator_spec.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/spec/frontend/lib/utils/ref_validator_spec.js b/spec/frontend/lib/utils/ref_validator_spec.js
index 7185ebf0a24..97896d74dff 100644
--- a/spec/frontend/lib/utils/ref_validator_spec.js
+++ b/spec/frontend/lib/utils/ref_validator_spec.js
@@ -65,9 +65,6 @@ describe('~/lib/utils/ref_validator', () => {
['foo.123.', validationMessages.DisallowedSequencePostfixesValidationMessage],
['foo/', validationMessages.DisallowedPostfixesValidationMessage],
-
- ['control-character\x7f', validationMessages.ControlCharactersValidationMessage],
- ['control-character\x15', validationMessages.ControlCharactersValidationMessage],
])('tag with name "%s"', (tagName, validationMessage) => {
it(`should be invalid with validation message "${validationMessage}"`, () => {
const result = validateTag(tagName);
@@ -75,5 +72,25 @@ describe('~/lib/utils/ref_validator', () => {
expect(result.validationErrors).toContain(validationMessage);
});
});
+
+ // NOTE: control characters cannot be used in test names because they cause test report XML parsing errors
+ describe.each([
+ [
+ 'control-character x7f',
+ 'control-character\x7f',
+ validationMessages.ControlCharactersValidationMessage,
+ ],
+ [
+ 'control-character x15',
+ 'control-character\x15',
+ validationMessages.ControlCharactersValidationMessage,
+ ],
+ ])('tag with name "%s"', (_, tagName, validationMessage) => {
+ it(`should be invalid with validation message "${validationMessage}"`, () => {
+ const result = validateTag(tagName);
+ expect(result.isValid).toBe(false);
+ expect(result.validationErrors).toContain(validationMessage);
+ });
+ });
});
});