require 'test_helper' class AmountSendsControllerTest < ActionController::TestCase setup do @amount_send = amount_sends(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:amount_sends) end test "should get new" do get :new assert_response :success end test "should create amount_send" do assert_difference('AmountSend.count') do post :create, amount_send: { amount: @amount_send.amount, amount: @amount_send.amount, from: @amount_send.from, status: @amount_send.status, to: @amount_send.to } end assert_redirected_to amount_send_path(assigns(:amount_send)) end test "should show amount_send" do get :show, id: @amount_send assert_response :success end test "should get edit" do get :edit, id: @amount_send assert_response :success end test "should update amount_send" do patch :update, id: @amount_send, amount_send: { amount: @amount_send.amount, amount: @amount_send.amount, from: @amount_send.from, status: @amount_send.status, to: @amount_send.to } assert_redirected_to amount_send_path(assigns(:amount_send)) end test "should destroy amount_send" do assert_difference('AmountSend.count', -1) do delete :destroy, id: @amount_send end assert_redirected_to amount_sends_path end end