フロントエンドプレイアブル
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
2026-02-15 14:57:17 +09:00
commit f25fd6f802
198 changed files with 10342 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
require "test_helper"
class GamesControllerTest < ActionDispatch::IntegrationTest
setup do
@game = games(:one)
end
test "should get index" do
get games_url
assert_response :success
end
test "should get new" do
get new_game_url
assert_response :success
end
test "should create game" do
assert_difference("Game.count") do
post games_url, params: { game: { memo: @game.memo, participants_count: @game.participants_count, title: @game.title } }
end
assert_redirected_to game_url(Game.last)
end
test "should show game" do
get game_url(@game)
assert_response :success
end
test "should get edit" do
get edit_game_url(@game)
assert_response :success
end
test "should update game" do
patch game_url(@game), params: { game: { memo: @game.memo, participants_count: @game.participants_count, title: @game.title } }
assert_redirected_to game_url(@game)
end
test "should destroy game" do
assert_difference("Game.count", -1) do
delete game_url(@game)
end
assert_redirected_to games_url
end
end