Commit fe0e0b73 authored by Simon Knox's avatar Simon Knox

Merge branch '2518-saved-configuration-for-issue-board' of...

Merge branch '2518-saved-configuration-for-issue-board' of gitlab.com:gitlab-org/gitlab-ee into 2518-saved-configuration-for-issue-board
parents a87ccd29 9b92f5d3
......@@ -801,21 +801,18 @@ module API
# EE-specific
# Default filtering configuration
expose :milestone,
using: Entities::Milestone,
if: -> (board, _) { board.parent.feature_available?(:scoped_issue_board) }
expose :assignee,
using: Entities::UserBasic,
if: -> (board, _) { board.parent.feature_available?(:scoped_issue_board) }
expose :labels,
using: Entities::LabelBasic,
if: -> (board, _) { board.parent.feature_available?(:scoped_issue_board) }
expose :weight,
if: -> (board, _) { board.parent.feature_available?(:scoped_issue_board) }
expose :milestone, using: Entities::Milestone, if: -> (board, _) { scoped_issue_available?(board) }
expose :assignee, using: Entities::UserBasic, if: -> (board, _) { scoped_issue_available?(board) }
expose :labels, using: Entities::LabelBasic, if: -> (board, _) { scoped_issue_available?(board) }
expose :weight, if: -> (board, _) { scoped_issue_available?(board) }
expose :lists, using: Entities::List do |board|
board.lists.destroyable
end
def scoped_issue_available?(board)
board.parent.feature_available?(:scoped_issue_board)
end
end
class Compare < Grape::Entity
......
......@@ -68,7 +68,6 @@ describe Projects::BoardsController do
expect(Board.count).to eq(1)
expect(board).to have_attributes(create_params.except(:assignee_id))
expect(board.assignee).to eq(user)
end
end
......@@ -141,7 +140,8 @@ describe Projects::BoardsController do
it 'updates board with valid params' do
update_board board, update_params
expect(board.reload).to have_attributes(update_params)
expect(board.reload).to have_attributes(update_params.except(:assignee_id))
expect(board.assignee).to eq(user)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment