Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splitsdb. a not-super-great speedrun splits sharer that was rebooted into splits.io
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950require 'test_helper'
class GamesControllerTest < ActionController::TestCase setup do @game = games(:one) end
test "should get index" do get :index assert_response :success assert_not_nil assigns(:games) end
test "should get new" do get :new assert_response :success end
test "should create game" do assert_difference('Game.count') do post :create, game: { cover: @game.cover, name: @game.name } end
assert_redirected_to game_path(assigns(:game)) end
test "should show game" do get :show, id: @game assert_response :success end
test "should get edit" do get :edit, id: @game assert_response :success end
test "should update game" do patch :update, id: @game, game: { cover: @game.cover, name: @game.name } assert_redirected_to game_path(assigns(:game)) end
test "should destroy game" do assert_difference('Game.count', -1) do delete :destroy, id: @game end
assert_redirected_to games_path endend