diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-02-19 16:06:16 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-03-03 12:56:17 -0300 |
commit | dd071c4b6e9754a0abeec45ab2040d9e2d5a62b8 (patch) | |
tree | 9dda99bb987378cb6cbc95d236757d11f21176a6 /spec/requests | |
parent | 98fecb5f8e64c4c64c96d065bc342d986140367e (diff) | |
download | gitlab-ce-dd071c4b6e9754a0abeec45ab2040d9e2d5a62b8.tar.gz |
Bring one group board to CE
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/group_boards_spec.rb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/spec/requests/api/group_boards_spec.rb b/spec/requests/api/group_boards_spec.rb new file mode 100644 index 00000000000..894c94688ba --- /dev/null +++ b/spec/requests/api/group_boards_spec.rb @@ -0,0 +1,54 @@ +require 'spec_helper' + +describe API::GroupBoards do + set(:user) { create(:user) } + set(:non_member) { create(:user) } + set(:guest) { create(:user) } + set(:admin) { create(:user, :admin) } + set(:board_parent) { create(:group, :public) } + + before do + board_parent.add_owner(user) + end + + set(:project) { create(:project, :public, namespace: board_parent ) } + + set(:dev_label) do + create(:group_label, title: 'Development', color: '#FFAABB', group: board_parent) + end + + set(:test_label) do + create(:group_label, title: 'Testing', color: '#FFAACC', group: board_parent) + end + + set(:ux_label) do + create(:group_label, title: 'UX', color: '#FF0000', group: board_parent) + end + + set(:dev_list) do + create(:list, label: dev_label, position: 1) + end + + set(:test_list) do + create(:list, label: test_label, position: 2) + end + + set(:milestone) { create(:milestone, group: board_parent) } + set(:board_label) { create(:group_label, group: board_parent) } + + set(:board) { create(:board, group: board_parent, lists: [dev_list, test_list]) } + + it_behaves_like 'group and project boards', "/groups/:id/boards", false + + describe 'POST /groups/:id/boards/lists' do + let(:url) { "/groups/#{board_parent.id}/boards/#{board.id}/lists" } + + it 'does not create lists for child project labels' do + project_label = create(:label, project: project) + + post api(url, user), label_id: project_label.id + + expect(response).to have_gitlab_http_status(400) + end + end +end |