Skip to content
Snippets Groups Projects
Commit 47881254 authored by Phil Hughes's avatar Phil Hughes
Browse files

Moved json parsing out of service

[ci skip]
parent 3d553954
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -77,6 +77,7 @@ export default {
},
deleteIssuable() {
this.service.deleteIssuable()
.then(res => res.json())
.then((data) => {
// Stop the poll so we don't get 404's with the issue not existing
this.poll.stop();
Loading
Loading
Loading
Loading
@@ -20,12 +20,10 @@ export default class Service {
}
 
deleteIssuable() {
return this.resource.delete()
.then(res => res.json());
return this.resource.delete();
}
 
updateIssuable(data) {
return this.resource.update(data)
.then(res => res.json());
return this.resource.update(data);
}
}
Loading
Loading
@@ -134,7 +134,9 @@ describe('Issuable output', () => {
spyOn(gl.utils, 'visitUrl');
spyOn(vm.service, 'deleteIssuable').and.callFake(() => new Promise((resolve) => {
resolve({
path: '/test',
json() {
return { path: '/test' };
},
});
}));
 
Loading
Loading
@@ -154,7 +156,9 @@ describe('Issuable output', () => {
spyOn(vm.poll, 'stop');
spyOn(vm.service, 'deleteIssuable').and.callFake(() => new Promise((resolve) => {
resolve({
path: '/test',
json() {
return { path: '/test' };
},
});
}));
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment