feat(hardlink): unify kiosk payments and finalize legacy cleanup

This commit is contained in:
2026-11-04 17:43:10 +00:00
parent 568adc034b
commit 814d87768d
57 changed files with 3624 additions and 1762 deletions
+5 -6
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
"io"
"net/http"
"net/http/httptest"
"reflect"
"strings"
"testing"
@@ -17,7 +16,7 @@ func TestReadHotelSuccess(t *testing.T) {
expected := cmstypes.ReservationSystemRec{}
server := httptest.NewServer(http.HandlerFunc(
server := newCMSMockServer(http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
t.Errorf(
@@ -157,7 +156,7 @@ func TestReadHotelValidation(t *testing.T) {
}
func TestReadHotelNotUpdated(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(
server := newCMSMockServer(http.HandlerFunc(
func(w http.ResponseWriter, _ *http.Request) {
response := cmstypes.HotelResponseRec{}
response.Status.Code = cmstypes.StatusSuccessCode
@@ -185,7 +184,7 @@ func TestReadHotelNotUpdated(t *testing.T) {
}
func TestReadHotelHTTPError(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(
server := newCMSMockServer(http.HandlerFunc(
func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
@@ -211,7 +210,7 @@ func TestReadHotelHTTPError(t *testing.T) {
}
func TestReadHotelInvalidJSON(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(
server := newCMSMockServer(http.HandlerFunc(
func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
@@ -230,4 +229,4 @@ func TestReadHotelInvalidJSON(t *testing.T) {
if !strings.Contains(err.Error(), "unmarshal CMS hotel response") {
t.Errorf("unexpected error: %v", err)
}
}
}