diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 18:08:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 18:08:37 +0300 |
commit | 37eff29d5ce44899e34c7c2ac319b314f2f26d15 (patch) | |
tree | b74e1632fdb58ea10972f270bfec70a4e6ee07b0 /spec/support/shared_examples/services | |
parent | 9411a664118a3247d0a56baf7e7ef4549c1201c3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/services')
-rw-r--r-- | spec/support/shared_examples/services/boards/boards_list_service.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/support/shared_examples/services/boards/boards_list_service.rb b/spec/support/shared_examples/services/boards/boards_list_service.rb index 25dc2e04942..18d45ee324a 100644 --- a/spec/support/shared_examples/services/boards/boards_list_service.rb +++ b/spec/support/shared_examples/services/boards/boards_list_service.rb @@ -29,3 +29,20 @@ shared_examples 'boards list service' do expect(service.execute).to eq [board] end end + +shared_examples 'multiple boards list service' do + let(:service) { described_class.new(parent, double) } + let!(:board_B) { create(:board, resource_parent: parent, name: 'B-board') } + let!(:board_c) { create(:board, resource_parent: parent, name: 'c-board') } + let!(:board_a) { create(:board, resource_parent: parent, name: 'a-board') } + + describe '#execute' do + it 'returns all issue boards' do + expect(service.execute.size).to eq(3) + end + + it 'returns boards ordered by name' do + expect(service.execute).to eq [board_a, board_B, board_c] + end + end +end |