2016-10-26 08:02:58 +00:00
|
|
|
/* eslint-disable */
|
2016-08-10 12:54:04 +00:00
|
|
|
const listObj = {
|
|
|
|
id: 1,
|
|
|
|
position: 0,
|
|
|
|
title: 'Test',
|
|
|
|
list_type: 'label',
|
|
|
|
label: {
|
|
|
|
id: 1,
|
|
|
|
title: 'Testing',
|
|
|
|
color: 'red',
|
|
|
|
description: 'testing;'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const listObjDuplicate = {
|
|
|
|
id: 2,
|
|
|
|
position: 1,
|
|
|
|
title: 'Test',
|
|
|
|
list_type: 'label',
|
|
|
|
label: {
|
|
|
|
id: 2,
|
|
|
|
title: 'Testing',
|
|
|
|
color: 'red',
|
|
|
|
description: 'testing;'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const BoardsMockData = {
|
|
|
|
'GET': {
|
2016-10-11 15:07:53 +00:00
|
|
|
'/test/issue-boards/board/1/lists{/id}/issues': {
|
2016-08-19 19:23:56 +00:00
|
|
|
issues: [{
|
|
|
|
title: 'Testing',
|
|
|
|
iid: 1,
|
|
|
|
confidential: false,
|
|
|
|
labels: []
|
|
|
|
}],
|
|
|
|
size: 1
|
|
|
|
}
|
2016-08-10 12:54:04 +00:00
|
|
|
},
|
|
|
|
'POST': {
|
2016-10-11 15:07:53 +00:00
|
|
|
'/test/issue-boards/board/1/lists{/id}': listObj
|
2016-08-10 12:54:04 +00:00
|
|
|
},
|
|
|
|
'PUT': {
|
2016-10-11 15:07:53 +00:00
|
|
|
'/test/issue-boards/board/1/lists{/id}': {}
|
2016-08-10 12:54:04 +00:00
|
|
|
},
|
|
|
|
'DELETE': {
|
2016-10-11 15:07:53 +00:00
|
|
|
'/test/issue-boards/board/1/lists{/id}': {}
|
2016-08-10 12:54:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-11-05 10:53:23 +00:00
|
|
|
const boardsMockInterceptor = (request, next) => {
|
2016-08-10 12:54:04 +00:00
|
|
|
const body = BoardsMockData[request.method][request.url];
|
|
|
|
|
|
|
|
next(request.respondWith(JSON.stringify(body), {
|
|
|
|
status: 200
|
|
|
|
}));
|
2016-11-05 10:53:23 +00:00
|
|
|
};
|