You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
require 'test_helper'
class ScoresControllerTest < ActionDispatch::IntegrationTest setup do @score = scores(:one) end
test 'should get index' do get scores_url assert_response :success end
test 'should get new' do get new_score_url assert_response :success end
test 'should create score' do assert_difference('Score.count') do post scores_url, params: { score: { grade: @score.grade, name: @score.name } } end
assert_redirected_to score_url(Score.last) end
test 'should show score' do get score_url(@score) assert_response :success end
test 'should get edit' do get edit_score_url(@score) assert_response :success end
test 'should update score' do patch score_url(@score), params: { score: { grade: @score.grade, name: @score.name } } assert_redirected_to score_url(@score) end
test 'should destroy score' do assert_difference('Score.count', -1) do delete score_url(@score) end
assert_redirected_to scores_url end end
|