Files
Repuestera/back/test/stock/liberarreserva.go
T

18 lines
425 B
Go

package stock
import (
"testing"
ctrl "repuestera_back/controllers/stock"
"github.com/gin-gonic/gin"
)
func TestLiberarReserva_Validacion(t *testing.T) {
context, recorder := newStockContext(t, "PATCH", "/stock/reservas/abc/liberar", nil, gin.Params{{Key: "id", Value: "abc"}})
ctrl.LiberarReserva(context)
if recorder.Code != 400 {
t.Fatalf("liberar id inválido: esperado 400, obtenido %d", recorder.Code)
}
}