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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user