package store_test import ( "encoding/json" "testing" "pageswiki/internal/ordoschnellic" "pageswiki/internal/store" ) func TestOrdoschnellicStoreCompatibility(t *testing.T) { var notification store.Notification = ordoschnellic.Notification{UUID: "notification", DomainUUID: "domain", RecipientUUID: "owner", Kind: "task.due", Status: "unread", CreatedAtMS: 1234} var delivery store.NotificationPushDelivery = ordoschnellic.PushDelivery{Notification: notification.UUID, Attempt: 1} if delivery.Notification != notification.UUID || store.ErrNotificationInput != ordoschnellic.ErrNotificationInput || store.NotificationPushEventType != ordoschnellic.PushEventType { t.Fatal("legacy identities changed") } data, err := json.Marshal(notification) if err != nil || string(data) != `{"uuid":"notification","domain_uuid":"domain","recipient_uuid":"owner","kind":"task.due","status":"unread","created_at_ms":1234}` { t.Fatalf("notification wire contract changed: %s %v", data, err) } }