summaryrefslogtreecommitdiff
path: root/spec/javascripts/issue_show/components/app_spec.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-18 22:35:38 +0100
committerPhil Hughes <me@iamphill.com>2017-05-18 22:35:42 +0100
commit1c463586c4b1aa39f8c55ec7de684faa13aa5d8b (patch)
tree7013e561f537635d3fea825682eb8fbb8f9e5175 /spec/javascripts/issue_show/components/app_spec.js
parentc225007a7238d8ed18a1b344a2bc354672b25408 (diff)
downloadgitlab-ce-1c463586c4b1aa39f8c55ec7de684faa13aa5d8b.tar.gz
Fixed random if statement [ci skip]
Diffstat (limited to 'spec/javascripts/issue_show/components/app_spec.js')
-rw-r--r--spec/javascripts/issue_show/components/app_spec.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js
index e1643f56d5d..91ae3cfd97c 100644
--- a/spec/javascripts/issue_show/components/app_spec.js
+++ b/spec/javascripts/issue_show/components/app_spec.js
@@ -116,6 +116,7 @@ describe('Issuable output', () => {
json() {
return {
confidential: true,
+ path: location.pathname,
};
},
});
@@ -126,7 +127,7 @@ describe('Issuable output', () => {
setTimeout(() => {
expect(
gl.utils.visitUrl,
- ).toHaveBeenCalledWith(location.href);
+ ).toHaveBeenCalledWith(location.pathname);
done();
});
@@ -154,7 +155,14 @@ describe('Issuable output', () => {
it('does not redirect if issue has not moved', (done) => {
spyOn(gl.utils, 'visitUrl');
spyOn(vm.service, 'updateIssuable').and.callFake(() => new Promise((resolve) => {
- resolve();
+ resolve({
+ json() {
+ return {
+ path: location.pathname,
+ confidential: vm.isConfidential,
+ };
+ },
+ });
}));
vm.updateIssuable();
@@ -175,6 +183,7 @@ describe('Issuable output', () => {
json() {
return {
path: '/testing-issue-move',
+ confidential: vm.isConfidential,
};
},
});