diff options
author | Valery Sizov <valery@gitlab.com> | 2017-03-03 21:10:07 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-03-03 21:23:33 +0300 |
commit | 32538def144f88a68c5cdfbe7cb7cb2866bce932 (patch) | |
tree | 77b71c3be17d359e92b5da1de44c6bbfe34f7fd4 /spec/services/boards | |
parent | 39db04bb17aa4ddb02290e4681d394190adb7e3c (diff) |
[Issue sorting on board] Addressing review issues
Diffstat (limited to 'spec/services/boards')
-rw-r--r-- | spec/services/boards/issues/list_service_spec.rb | 26 | ||||
-rw-r--r-- | spec/services/boards/issues/move_service_spec.rb | 4 |
2 files changed, 2 insertions, 28 deletions
diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index 305278843f5..01baedc4761 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -43,32 +43,6 @@ describe Boards::Issues::ListService, services: true do described_class.new(project, user, params).execute end - context 'sets default order to priority' do - it 'returns opened issues when list id is missing' do - params = { board_id: board.id } - - issues = described_class.new(project, user, params).execute - - expect(issues).to eq [opened_issue2, reopened_issue1, opened_issue1] - end - - it 'returns closed issues when listing issues from Done' do - params = { board_id: board.id, id: done.id } - - issues = described_class.new(project, user, params).execute - - expect(issues).to eq [closed_issue4, closed_issue2, closed_issue3, closed_issue1] - end - - it 'returns opened issues that have label list applied when listing issues from a label list' do - params = { board_id: board.id, id: list1.id } - - issues = described_class.new(project, user, params).execute - - expect(issues).to eq [list1_issue3, list1_issue1, list1_issue2] - end - end - context 'with list that does not belong to the board' do it 'raises an error' do list = create(:list) diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index 5b71762e2b3..e0bbdba531b 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -94,9 +94,9 @@ describe Boards::Issues::MoveService, services: true do end it 'sorts issues' do - issue.move_between(issue1, issue2) + issue.move_between!(issue1, issue2) - params.merge! move_after_iid: issue1.iid, move_before_iid: issue2.iid + params.merge! move_after_iid: issue.iid, move_before_iid: issue2.iid described_class.new(project, user, params).execute(issue1) |