Files
fizzy/test/controllers/cards/drafts_controller_test.rb
T
Jorge Manrubia f58a1aeb31 Use a dedicated resource for showing cards in draft mode
Mobile team needs this. Also, this lets us get rid from some conditionals for handling
both modes with a single template.

https://3.basecamp.com/2914079/buckets/44843469/messages/9437287330
2026-01-08 10:40:21 +01:00

22 lines
446 B
Ruby

require "test_helper"
class Cards::DraftsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "show" do
card = boards(:writebook).cards.create!(creator: users(:kevin), status: :drafted)
get card_draft_path(card)
assert_response :success
end
test "show redirects to card when published" do
card = cards(:logo)
get card_draft_path(card)
assert_redirected_to card
end
end