Sha256: 42e59021db67981a9db04fe27403a490ba627e9a92d1783a9c1fe1960b325bfa
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require 'test_helper' class SportsControllerTest < ActionController::TestCase setup do @sport = sports(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:sports) end test "should get new" do get :new assert_response :success end test "should create sport" do assert_difference('Sport.count') do post :create, sport: @sport.attributes end assert_redirected_to sport_path(assigns(:sport)) end test "should show sport" do get :show, id: @sport.to_param assert_response :success end test "should get edit" do get :edit, id: @sport.to_param assert_response :success end test "should update sport" do put :update, id: @sport.to_param, sport: @sport.attributes assert_redirected_to sport_path(assigns(:sport)) end test "should destroy sport" do assert_difference('Sport.count', -1) do delete :destroy, id: @sport.to_param end assert_redirected_to sports_path end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
routespec-0.0.1 | test/rails311/test/functional/sports_controller_test.rb |