MCPcopy Create free account
hub / github.com/github/gh-aw / TestLockMetadataToJSONWithStopTime

Function TestLockMetadataToJSONWithStopTime

pkg/workflow/lock_schema_test.go:594–607  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

592}
593
594func TestLockMetadataToJSONWithStopTime(t *testing.T) {
595 // Test JSON serialization includes stop time when present
596 metadata := &LockMetadata{
597 SchemaVersion: LockSchemaV1,
598 FrontmatterHash: "test123",
599 StopTime: "2026-02-17 20:00:00",
600 }
601
602 json, err := metadata.ToJSON()
603 require.NoError(t, err)
604 assert.Contains(t, json, `"schema_version":"v1"`)
605 assert.Contains(t, json, `"frontmatter_hash":"test123"`)
606 assert.Contains(t, json, `"stop_time":"2026-02-17 20:00:00"`)
607}
608
609func TestLockMetadataToJSONWithoutStopTime(t *testing.T) {
610 // Test JSON serialization omits stop time when empty (omitempty)

Callers

nothing calls this directly

Calls 1

ToJSONMethod · 0.95

Tested by

no test coverage detected