diff options
Diffstat (limited to 'spec/javascripts/boards/list_spec.js')
-rw-r--r-- | spec/javascripts/boards/list_spec.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/javascripts/boards/list_spec.js b/spec/javascripts/boards/list_spec.js index db50829a276..d4627223a12 100644 --- a/spec/javascripts/boards/list_spec.js +++ b/spec/javascripts/boards/list_spec.js @@ -1,6 +1,7 @@ /* eslint-disable comma-dangle */ /* global boardsMockInterceptor */ /* global BoardService */ +/* global mockBoardService */ /* global List */ /* global ListIssue */ /* global listObj */ @@ -22,7 +23,9 @@ describe('List model', () => { beforeEach(() => { Vue.http.interceptors.push(boardsMockInterceptor); - gl.boardService = new BoardService('/test/issue-boards/board', '', '1'); + gl.boardService = mockBoardService({ + bulkUpdatePath: '/test/issue-boards/board/1/lists', + }); gl.issueBoards.BoardsStore.create(); list = new List(listObj); @@ -92,6 +95,7 @@ describe('List model', () => { const listDup = new List(listObjDuplicate); const issue = new ListIssue({ title: 'Testing', + id: _.random(10000), iid: _.random(10000), confidential: false, labels: [list.label, listDup.label], @@ -118,6 +122,7 @@ describe('List model', () => { for (let i = 0; i < 30; i += 1) { list.issues.push(new ListIssue({ title: 'Testing', + id: _.random(10000) + i, iid: _.random(10000) + i, confidential: false, labels: [list.label], @@ -137,7 +142,7 @@ describe('List model', () => { it('does not increase page number if issue count is less than the page size', () => { list.issues.push(new ListIssue({ title: 'Testing', - iid: _.random(10000), + id: _.random(10000), confidential: false, labels: [list.label], assignees: [], @@ -156,7 +161,7 @@ describe('List model', () => { spyOn(gl.boardService, 'newIssue').and.returnValue(Promise.resolve({ json() { return { - iid: 42, + id: 42, }; }, })); @@ -165,14 +170,14 @@ describe('List model', () => { it('adds new issue to top of list', (done) => { list.issues.push(new ListIssue({ title: 'Testing', - iid: _.random(10000), + id: _.random(10000), confidential: false, labels: [list.label], assignees: [], })); const dummyIssue = new ListIssue({ title: 'new issue', - iid: _.random(10000), + id: _.random(10000), confidential: false, labels: [list.label], assignees: [], |