Commit d0a49a6f authored by Phil Hughes's avatar Phil Hughes

Updated teaspoon mock tests endpoints

parent d432e077
...@@ -26,7 +26,7 @@ const listObjDuplicate = { ...@@ -26,7 +26,7 @@ const listObjDuplicate = {
const BoardsMockData = { const BoardsMockData = {
'GET': { 'GET': {
'/test/issue-boards/board/lists{/id}/issues.json': [{ '/test/issue-boards/board/lists{/id}/issues': [{
title: 'Testing', title: 'Testing',
iid: 1, iid: 1,
confidential: false, confidential: false,
...@@ -34,18 +34,19 @@ const BoardsMockData = { ...@@ -34,18 +34,19 @@ const BoardsMockData = {
}] }]
}, },
'POST': { 'POST': {
'/test/issue-boards/board/lists{/id}.json': listObj '/test/issue-boards/board/lists{/id}': listObj
}, },
'PUT': { 'PUT': {
'/test/issue-boards/board/lists{/id}.json': {} '/test/issue-boards/board/lists{/id}': {}
}, },
'DELETE': { 'DELETE': {
'/test/issue-boards/board/lists{/id}.json': {} '/test/issue-boards/board/lists{/id}': {}
} }
}; };
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
const body = BoardsMockData[request.method][request.url]; const body = BoardsMockData[request.method][request.url];
console.log(request.url);
next(request.respondWith(JSON.stringify(body), { next(request.respondWith(JSON.stringify(body), {
status: 200 status: 200
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment