diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 18:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 18:09:01 +0300 |
commit | b304a72312465ed4c0a568ee6a6ea5e97f705c9b (patch) | |
tree | a2f25dbea26c81e88b169c55a6275e3969323e82 /spec/requests/api/boards_spec.rb | |
parent | b84eeb256c4a780d902faee1f99ca9a711b3214a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/boards_spec.rb')
-rw-r--r-- | spec/requests/api/boards_spec.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index 510ef9d7d0a..f53bfedb49a 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -3,35 +3,35 @@ require 'spec_helper' describe API::Boards do - set(:user) { create(:user) } - set(:non_member) { create(:user) } - set(:guest) { create(:user) } - set(:admin) { create(:user, :admin) } - set(:board_parent) { create(:project, :public, creator_id: user.id, namespace: user.namespace ) } + let_it_be(:user) { create(:user) } + let_it_be(:non_member) { create(:user) } + let_it_be(:guest) { create(:user) } + let_it_be(:admin) { create(:user, :admin) } + let_it_be(:board_parent, reload: true) { create(:project, :public, creator_id: user.id, namespace: user.namespace ) } - set(:dev_label) do + let_it_be(:dev_label) do create(:label, title: 'Development', color: '#FFAABB', project: board_parent) end - set(:test_label) do + let_it_be(:test_label) do create(:label, title: 'Testing', color: '#FFAACC', project: board_parent) end - set(:ux_label) do + let_it_be(:ux_label) do create(:label, title: 'UX', color: '#FF0000', project: board_parent) end - set(:dev_list) do + let_it_be(:dev_list) do create(:list, label: dev_label, position: 1) end - set(:test_list) do + let_it_be(:test_list) do create(:list, label: test_label, position: 2) end - set(:milestone) { create(:milestone, project: board_parent) } - set(:board_label) { create(:label, project: board_parent) } - set(:board) { create(:board, project: board_parent, lists: [dev_list, test_list]) } + let_it_be(:milestone) { create(:milestone, project: board_parent) } + let_it_be(:board_label) { create(:label, project: board_parent) } + let_it_be(:board) { create(:board, project: board_parent, lists: [dev_list, test_list]) } it_behaves_like 'group and project boards', "/projects/:id/boards" @@ -66,11 +66,11 @@ describe API::Boards do end describe "POST /groups/:id/boards/lists" do - set(:group) { create(:group) } - set(:board_parent) { create(:group, parent: group ) } + let_it_be(:group) { create(:group) } + let_it_be(:board_parent) { create(:group, parent: group ) } let(:url) { "/groups/#{board_parent.id}/boards/#{board.id}/lists" } - set(:board) { create(:board, group: board_parent) } + let_it_be(:board) { create(:board, group: board_parent) } it 'creates a new board list for ancestor group labels' do group.add_developer(user) |