lib/api/crm/crm_models/asset_contract_test.go

19 lines
415 B
Go
Raw Normal View History

2026-07-24 03:05:55 +00:00
package crm_models
import (
"encoding/json"
"testing"
)
func TestAssetLifecycleStartDateIsInGeneratedJSONContract(t *testing.T) {
start := "2026-07-24T03:00:00Z"
body, err := json.Marshal(&Asset{CurrentLifecycleStartDate: &start})
if err != nil {
t.Fatal(err)
}
const want = `{"CurrentLifecycleStartDate":"2026-07-24T03:00:00Z"}`
if string(body) != want {
t.Fatalf("got %s, want %s", body, want)
}
}