f58a1aeb31
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
22 lines
446 B
Ruby
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
|