diff options
author | Phil Hughes <me@iamphill.com> | 2017-02-21 16:00:33 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-02-21 16:00:33 +0000 |
commit | 6a2ee01b552493da7753527b0de6cfb83b498622 (patch) | |
tree | 0ac4d1d9c3c25ebb2140c21e4c7177e6f9977129 /spec/javascripts/boards | |
parent | 459a97d46812fecc59c973bad356935422c7f60e (diff) | |
download | gitlab-ce-6a2ee01b552493da7753527b0de6cfb83b498622.tar.gz |
Removes label from previous listmoving-issue-with-two-list-labels
When dragging an issue to a list that it already exists in it was previously not removing the label for the list it was moving from. This changes that to make that API call.
Closes #28484
Diffstat (limited to 'spec/javascripts/boards')
-rw-r--r-- | spec/javascripts/boards/list_spec.js.es6 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/javascripts/boards/list_spec.js.es6 b/spec/javascripts/boards/list_spec.js.es6 index 4397a32fedc..c8a18af7198 100644 --- a/spec/javascripts/boards/list_spec.js.es6 +++ b/spec/javascripts/boards/list_spec.js.es6 @@ -3,7 +3,9 @@ /* global boardsMockInterceptor */ /* global BoardService */ /* global List */ +/* global ListIssue */ /* global listObj */ +/* global listObjDuplicate */ require('~/lib/utils/url_utility'); require('~/boards/models/issue'); @@ -84,4 +86,23 @@ describe('List model', () => { done(); }, 0); }); + + it('sends service request to update issue label', () => { + const listDup = new List(listObjDuplicate); + const issue = new ListIssue({ + title: 'Testing', + iid: 1, + confidential: false, + labels: [list.label, listDup.label] + }); + + list.issues.push(issue); + listDup.issues.push(issue); + + spyOn(gl.boardService, 'moveIssue').and.callThrough(); + + listDup.updateIssueLabel(list, issue); + + expect(gl.boardService.moveIssue).toHaveBeenCalledWith(issue.id, list.id, listDup.id); + }); }); |