14 lines
556 B
Ruby
14 lines
556 B
Ruby
require "test_helper"
|
|
|
|
class RutaControllerTest < ActionDispatch::IntegrationTest
|
|
test "should get get" do
|
|
get ruta_get_url, params: {ruta: 1}
|
|
assert_response :success
|
|
end
|
|
|
|
test "should get add" do
|
|
post ruta_add_url, params: {viajes: [{direccion_partida: "Partida", direccion_llegada: "Llegada", kms: 10, entregas: [{nombre_recibe: "Recibe", carga: "{\"cantidad\": 10, \"descripcion\": \"Cajas\"}"}], retiros: [{nombre_entrega: "Entrega", carga: "{\"cantidad\": 2, \"descripcion\": \"Cajas\"}"}]}]}
|
|
assert_response :success
|
|
end
|
|
end
|