diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2018-04-04 15:40:29 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-04 15:40:29 +0000 |
commit | ad7148d9ead6e76a80840c069ca0921f7e790041 (patch) | |
tree | 7681db499ad5bf3e0300b578a223717788cfc95a /spec/requests | |
parent | aff9bf11d98febc038b7deedfafb3b361ad392b2 (diff) | |
download | gitlab-ce-ad7148d9ead6e76a80840c069ca0921f7e790041.tar.gz |
Allow assigning and filtering issuables by ancestor group labels
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/boards_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index c6c10025f7f..92b614b087e 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -48,5 +48,36 @@ describe API::Boards do expect(json_response['label']['name']).to eq(group_label.title) expect(json_response['position']).to eq(3) end + + it 'creates a new board list for ancestor group labels' do + group = create(:group) + sub_group = create(:group, parent: group) + group_label = create(:group_label, group: group) + board_parent.update(group: sub_group) + group.add_developer(user) + sub_group.add_developer(user) + + post api(url, user), label_id: group_label.id + + expect(response).to have_gitlab_http_status(201) + expect(json_response['label']['name']).to eq(group_label.title) + end + end + + describe "POST /groups/:id/boards/lists", :nested_groups do + set(:group) { create(:group) } + set(:board_parent) { create(:group, parent: group ) } + let(:url) { "/groups/#{board_parent.id}/boards/#{board.id}/lists" } + set(:board) { create(:board, group: board_parent) } + + it 'creates a new board list for ancestor group labels' do + group.add_developer(user) + group_label = create(:group_label, group: group) + + post api(url, user), label_id: group_label.id + + expect(response).to have_gitlab_http_status(201) + expect(json_response['label']['name']).to eq(group_label.title) + end end end |