Merge branch 'remove-vue-resource-from-issue' into 'master'
Remove vue resource from issue See merge request gitlab-org/gitlab-ce!32421
This commit is contained in:
commit
b23e42b010
3 changed files with 10 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
/* global ListMilestone */
|
||||
/* global ListAssignee */
|
||||
|
||||
import Vue from 'vue';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import './label';
|
||||
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||
import IssueProject from './project';
|
||||
|
@ -133,7 +133,7 @@ class ListIssue {
|
|||
}
|
||||
|
||||
const projectPath = this.project ? this.project.path : '';
|
||||
return Vue.http.patch(`${this.path}.json`, data).then(({ body = {} } = {}) => {
|
||||
return axios.patch(`${this.path}.json`, data).then(({ data: body = {} } = {}) => {
|
||||
/**
|
||||
* Since post implementation of Scoped labels, server can reject
|
||||
* same key-ed labels. To keep the UI and server Model consistent,
|
||||
|
|
5
changelogs/unreleased/remove-vue-resource-from-issue.yml
Normal file
5
changelogs/unreleased/remove-vue-resource-from-issue.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove vue resource from issue
|
||||
merge_request: 32421
|
||||
author: Lee Tickett
|
||||
type: other
|
|
@ -1,6 +1,6 @@
|
|||
/* global ListIssue */
|
||||
|
||||
import Vue from 'vue';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import '~/boards/models/label';
|
||||
import '~/boards/models/assignee';
|
||||
import '~/boards/models/issue';
|
||||
|
@ -175,7 +175,7 @@ describe('Issue model', () => {
|
|||
|
||||
describe('update', () => {
|
||||
it('passes assignee ids when there are assignees', done => {
|
||||
spyOn(Vue.http, 'patch').and.callFake((url, data) => {
|
||||
spyOn(axios, 'patch').and.callFake((url, data) => {
|
||||
expect(data.issue.assignee_ids).toEqual([1]);
|
||||
done();
|
||||
return Promise.resolve();
|
||||
|
@ -185,7 +185,7 @@ describe('Issue model', () => {
|
|||
});
|
||||
|
||||
it('passes assignee ids of [0] when there are no assignees', done => {
|
||||
spyOn(Vue.http, 'patch').and.callFake((url, data) => {
|
||||
spyOn(axios, 'patch').and.callFake((url, data) => {
|
||||
expect(data.issue.assignee_ids).toEqual([0]);
|
||||
done();
|
||||
return Promise.resolve();
|
||||
|
|
Loading…
Reference in a new issue