Sha256: fa9d47ec795f33fcdd4c9dbac53401db7441c4f7c7638ec7d9b9e1610944f684
Contents?: true
Size: 1.03 KB
Versions: 8
Compression:
Stored size: 1.03 KB
Contents
require 'test_helper' class ChoicesControllerTest < ActionController::TestCase setup do @choice = choices(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:choices) end test "should get new" do get :new assert_response :success end test "should create choice" do assert_difference('Choice.count') do post :create, choice: @choice.attributes end assert_redirected_to choice_path(assigns(:choice)) end test "should show choice" do get :show, id: @choice.to_param assert_response :success end test "should get edit" do get :edit, id: @choice.to_param assert_response :success end test "should update choice" do put :update, id: @choice.to_param, choice: @choice.attributes assert_redirected_to choice_path(assigns(:choice)) end test "should destroy choice" do assert_difference('Choice.count', -1) do delete :destroy, id: @choice.to_param end assert_redirected_to choices_path end end
Version data entries
8 entries across 8 versions & 1 rubygems