Add API for mobing cards between boards

This commit is contained in:
Stanko K.R.
2025-12-05 14:07:19 +01:00
parent 23e6f3b095
commit cf52982b8b
2 changed files with 17 additions and 1 deletions
@@ -17,4 +17,16 @@ class Cards::BoardsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to card
end
test "update as JSON" do
card = cards(:logo)
new_board = boards(:private)
assert_not_equal new_board, card.board
put card_board_path(card), params: { board_id: new_board.id }, as: :json
assert_response :no_content
assert_equal new_board, card.reload.board
end
end