Pruebas
This commit is contained in:
13
test/controllers/ruta_controller_test.rb
Normal file
13
test/controllers/ruta_controller_test.rb
Normal file
@ -0,0 +1,13 @@
|
||||
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
|
Reference in New Issue
Block a user