Baseline replacing collection with board across code

This commit is contained in:
Jorge Manrubia
2025-11-05 13:31:54 +01:00
parent 8caaad0105
commit 03a345609e
269 changed files with 990 additions and 990 deletions
+6 -6
View File
@@ -17,7 +17,7 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
test "create a new draft" do
assert_difference -> { Card.count }, 1 do
post collection_cards_path(collections(:writebook))
post board_cards_path(boards(:writebook))
end
assert Card.last.drafted?
@@ -25,10 +25,10 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
end
test "create resumes existing draft if it exists" do
draft = collections(:writebook).cards.create!(creator: users(:kevin), status: :drafted)
draft = boards(:writebook).cards.create!(creator: users(:kevin), status: :drafted)
assert_no_difference -> { Card.count } do
post collection_cards_path(collections(:writebook))
post board_cards_path(boards(:writebook))
end
assert_redirected_to draft
@@ -61,12 +61,12 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
assert_equal "Something more in-depth", card.description.to_plain_text.strip
end
test "users can only see cards in collections they have access to" do
test "users can only see cards in boards they have access to" do
get card_path(cards(:logo))
assert_response :success
collections(:writebook).update! all_access: false
collections(:writebook).accesses.revoke_from users(:kevin)
boards(:writebook).update! all_access: false
boards(:writebook).accesses.revoke_from users(:kevin)
get card_path(cards(:logo))
assert_response :not_found
end