test(contract): Add Contract v1 test fixtures

- Add valid fixtures: minimal, typical, maximal
- Add invalid fixtures: missing required, wrong units
- Fixtures used for contract validation and round-trip testing

See tests/fixtures/v1/ for test contract samples.
This commit is contained in:
Matthew Raymer
2025-11-12 11:24:01 +00:00
parent b9f9f1c4d2
commit 06b77bd301
5 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
{
"title": "Missing ID",
"fetchTime": 1738022400000
}

View File

@@ -0,0 +1,7 @@
{
"id": "test-notification-004",
"title": "Wrong Time Units",
"fetchTime": 1738022400,
"scheduledTime": 1738026000
}

17
tests/fixtures/v1/valid-maximal.json vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"id": "test-notification-003",
"title": "Complete Notification",
"body": "This notification includes all optional fields",
"scheduledTime": 1738026000000,
"fetchTime": 1738022400000,
"mediaUrl": "https://example.com/image.jpg",
"ttlSeconds": 7200,
"dedupeKey": "unique-key-123",
"priority": "high",
"metadata": {
"source": "test",
"category": "daily",
"tags": ["important", "daily"]
}
}

6
tests/fixtures/v1/valid-minimal.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"id": "test-notification-001",
"title": "Test Notification",
"fetchTime": 1738022400000
}

11
tests/fixtures/v1/valid-typical.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"id": "test-notification-002",
"title": "Daily Update",
"body": "Your daily notification is ready",
"scheduledTime": 1738026000000,
"fetchTime": 1738022400000,
"mediaUrl": "https://example.com/image.jpg",
"ttlSeconds": 3600,
"priority": "default"
}