require 'test_helper' class StandaloneResourcesControllerTest < ActionController::TestCase setup do @standalone_resource = standalone_resources(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:standalone_resources) end test "should get new" do get :new assert_response :success end test "should create standalone_resource" do assert_difference('StandaloneResource.count') do post :create, standalone_resource: { description: @standalone_resource.description, name: @standalone_resource.name } end assert_redirected_to standalone_resource_path(assigns(:standalone_resource)) end test "should show standalone_resource" do get :show, id: @standalone_resource assert_response :success end test "should get edit" do get :edit, id: @standalone_resource assert_response :success end test "should update standalone_resource" do put :update, id: @standalone_resource, standalone_resource: { description: @standalone_resource.description, name: @standalone_resource.name } assert_redirected_to standalone_resource_path(assigns(:standalone_resource)) end test "should destroy standalone_resource" do assert_difference('StandaloneResource.count', -1) do delete :destroy, id: @standalone_resource end assert_redirected_to standalone_resources_path end end