summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-25 16:19:36 +0000
committerRémy Coutable <remy@rymai.me>2018-01-25 16:19:36 +0000
commite4c2ce6f67ffdaa88ee394c93e07f175f6e309eb (patch)
treed446d5543f62769e3694e8505fbd3dc6f228d517 /spec/javascripts
parent5c68c839c09f2a091fa677d35cbfd3de5a2e6d43 (diff)
parentbb9b7bf6e33ae68d1f898c4cd5e09b44bee2be80 (diff)
downloadgitlab-ce-e4c2ce6f67ffdaa88ee394c93e07f175f6e309eb.tar.gz
Merge branch '40028-special-characters-on-issuable-templates' into 'master'
Handling special characters in Issuable Templates Closes #40028 See merge request gitlab-org/gitlab-ce!15323
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/api_spec.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js
index 2aa4fb1f6c6..cc5fa42aafe 100644
--- a/spec/javascripts/api_spec.js
+++ b/spec/javascripts/api_spec.js
@@ -262,9 +262,9 @@ describe('Api', () => {
it('fetches an issue template', (done) => {
const namespace = 'some namespace';
const project = 'some project';
- const templateKey = 'template key';
+ const templateKey = ' template #%?.key ';
const templateType = 'template type';
- const expectedUrl = `${dummyUrlRoot}/${namespace}/${project}/templates/${templateType}/${templateKey}`;
+ const expectedUrl = `${dummyUrlRoot}/${namespace}/${project}/templates/${templateType}/${encodeURIComponent(templateKey)}`;
spyOn(jQuery, 'ajax').and.callFake((request) => {
expect(request.url).toEqual(expectedUrl);
return sendDummyResponse();