require 'test_helper' class EmptiesControllerTest < ActionController::TestCase setup do @empty = empties(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:empties) end test "should get new" do get :new assert_response :success end test "should create empty" do assert_difference('Empty.count') do post :create, empty: { } end assert_redirected_to empty_path(assigns(:empty)) end test "should show empty" do get :show, id: @empty assert_response :success end test "should get edit" do get :edit, id: @empty assert_response :success end test "should update empty" do patch :update, id: @empty, empty: { } assert_redirected_to empty_path(assigns(:empty)) end test "should destroy empty" do assert_difference('Empty.count', -1) do delete :destroy, id: @empty end assert_redirected_to empties_path end end