Remove "save as draft"

Removes the creating status completely as well as the abandoned cards system. It will
always resume drafts if they exist, for a given collection and user.

https://app.box-car.com/5986089/cards/2489
This commit is contained in:
Jorge Manrubia
2025-11-02 11:20:16 +01:00
parent efd5c1dba2
commit 9d4dd3b00e
19 changed files with 35 additions and 125 deletions
+14 -2
View File
@@ -15,11 +15,23 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
end
test "create" do
test "create a new draft" do
assert_difference -> { Card.count }, 1 do
post collection_cards_path(collections(:writebook))
end
assert_redirected_to card_path(Card.last)
assert Card.last.drafted?
assert_redirected_to Card.last
end
test "create resumes existing draft if it exists" do
draft = collections(:writebook).cards.create!(creator: users(:kevin), status: :drafted)
assert_no_difference -> { Card.count } do
post collection_cards_path(collections(:writebook))
end
assert_redirected_to draft
end
test "show" do