Files
fizzy/test/controllers/cards/goldnesses_controller_test.rb
T
David Heinemeier Hansson 06da295f44 Fix tests
2025-04-17 14:56:53 +02:00

22 lines
557 B
Ruby

require "test_helper"
class Cards::GoldnessesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "create" do
assert_changes -> { cards(:text).reload.golden? }, from: false, to: true do
post card_goldness_path(cards(:text)), as: :turbo_stream
assert_response :success
end
end
test "destroy" do
assert_changes -> { cards(:logo).reload.golden? }, from: true, to: false do
delete card_goldness_path(cards(:logo)), as: :turbo_stream
assert_response :success
end
end
end