mirror of https://github.com/vernonkeenan/lib
19 lines
415 B
Go
19 lines
415 B
Go
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)
|
|
}
|
|
}
|