6073f79191
Follow up to https://fizzy.37signals.com/5986089/cards/2198
19 lines
508 B
Ruby
19 lines
508 B
Ruby
require "test_helper"
|
|
|
|
class Cards::RecoversControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in_as :jz
|
|
end
|
|
|
|
test "create" do
|
|
abandoned_card = collections(:writebook).cards.create! creator: users(:kevin)
|
|
abandoned_card.update!(title: "An edited title")
|
|
unsaved_card = collections(:writebook).cards.create! creator: users(:kevin)
|
|
|
|
post card_recover_path(unsaved_card)
|
|
|
|
assert_redirected_to abandoned_card
|
|
assert_equal [ abandoned_card ], Card.creating
|
|
end
|
|
end
|