Baseline replacing collection with board across code
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
require "test_helper"
|
||||
|
||||
class Cards::CollectionsControllerTest < ActionDispatch::IntegrationTest
|
||||
class Cards::BoardsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "update changes card collection" do
|
||||
test "update changes card board" do
|
||||
card = cards(:logo)
|
||||
new_collection = collections(:private)
|
||||
new_board = boards(:private)
|
||||
|
||||
assert_not_equal new_collection, card.collection
|
||||
assert_not_equal new_board, card.board
|
||||
|
||||
assert_changes -> { card.reload.collection }, from: card.collection, to: new_collection do
|
||||
put card_collection_path(card), params: { collection_id: new_collection.id }
|
||||
assert_changes -> { card.reload.board }, from: card.board, to: new_board do
|
||||
put card_board_path(card), params: { board_id: new_board.id }
|
||||
end
|
||||
|
||||
assert_redirected_to card
|
||||
|
||||
@@ -13,7 +13,7 @@ class Cards::PublishesControllerTest < ActionDispatch::IntegrationTest
|
||||
post card_publish_path(card)
|
||||
end
|
||||
|
||||
assert_redirected_to card.collection
|
||||
assert_redirected_to card.board
|
||||
end
|
||||
|
||||
test "create and add another" do
|
||||
|
||||
Reference in New Issue
Block a user