summaryrefslogtreecommitdiff
path: root/spec/javascripts/boards/boards_store_spec.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-24 13:13:44 +0000
committerPhil Hughes <me@iamphill.com>2017-03-27 11:43:17 +0100
commit88280aa6bb238da2b6236dbca2c22e6554b5233f (patch)
treee45f10befd7f868841c104938d475b3f572ba475 /spec/javascripts/boards/boards_store_spec.js
parent4a8e516c1fcdc2d5cb2b1cd2fcded382413d95f6 (diff)
downloadgitlab-ce-88280aa6bb238da2b6236dbca2c22e6554b5233f.tar.gz
Fixed up issue boards JS specs
The objects where passed in the wrong order so would actually cause a timeout eventually. Also changed to used random numbers so this error would of been more obvious Closes #29329
Diffstat (limited to 'spec/javascripts/boards/boards_store_spec.js')
-rw-r--r--spec/javascripts/boards/boards_store_spec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/javascripts/boards/boards_store_spec.js b/spec/javascripts/boards/boards_store_spec.js
index e21f4ca2bc0..8153e46c438 100644
--- a/spec/javascripts/boards/boards_store_spec.js
+++ b/spec/javascripts/boards/boards_store_spec.js
@@ -50,9 +50,9 @@ describe('Store', () => {
it('finds list by ID', () => {
gl.issueBoards.BoardsStore.addList(listObj);
- const list = gl.issueBoards.BoardsStore.findList('id', 1);
+ const list = gl.issueBoards.BoardsStore.findList('id', listObj.id);
- expect(list.id).toBe(1);
+ expect(list.id).toBe(listObj.id);
});
it('finds list by type', () => {
@@ -64,7 +64,7 @@ describe('Store', () => {
it('gets issue when new list added', (done) => {
gl.issueBoards.BoardsStore.addList(listObj);
- const list = gl.issueBoards.BoardsStore.findList('id', 1);
+ const list = gl.issueBoards.BoardsStore.findList('id', listObj.id);
expect(gl.issueBoards.BoardsStore.state.lists.length).toBe(1);
@@ -89,9 +89,9 @@ describe('Store', () => {
expect(gl.issueBoards.BoardsStore.state.lists.length).toBe(1);
setTimeout(() => {
- const list = gl.issueBoards.BoardsStore.findList('id', 1);
+ const list = gl.issueBoards.BoardsStore.findList('id', listObj.id);
expect(list).toBeDefined();
- expect(list.id).toBe(1);
+ expect(list.id).toBe(listObj.id);
expect(list.position).toBe(0);
done();
}, 0);
@@ -126,7 +126,7 @@ describe('Store', () => {
expect(gl.issueBoards.BoardsStore.state.lists.length).toBe(1);
- gl.issueBoards.BoardsStore.removeList(1, 'label');
+ gl.issueBoards.BoardsStore.removeList(listObj.id, 'label');
expect(gl.issueBoards.BoardsStore.state.lists.length).toBe(0);
});
@@ -137,7 +137,7 @@ describe('Store', () => {
expect(gl.issueBoards.BoardsStore.state.lists.length).toBe(2);
- gl.issueBoards.BoardsStore.moveList(listOne, ['2', '1']);
+ gl.issueBoards.BoardsStore.moveList(listOne, [listObjDuplicate.id, listObj.id]);
expect(listOne.position).toBe(1);
});