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