(t *testing.T)
| 576 | } |
| 577 | |
| 578 | func TestExtractMetadataWithStopTime(t *testing.T) { |
| 579 | // Test extracting metadata that includes stop time |
| 580 | stopTime := "2026-02-17 20:00:00" |
| 581 | content := `# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"abc123","stop_time":"` + stopTime + `"} |
| 582 | name: test |
| 583 | ` |
| 584 | |
| 585 | metadata, isLegacy, err := ExtractMetadataFromLockFile(content) |
| 586 | require.NoError(t, err) |
| 587 | assert.False(t, isLegacy) |
| 588 | require.NotNil(t, metadata) |
| 589 | assert.Equal(t, LockSchemaV1, metadata.SchemaVersion) |
| 590 | assert.Equal(t, "abc123", metadata.FrontmatterHash) |
| 591 | assert.Equal(t, stopTime, metadata.StopTime, "Should extract stop time from metadata") |
| 592 | } |
| 593 | |
| 594 | func TestLockMetadataToJSONWithStopTime(t *testing.T) { |
| 595 | // Test JSON serialization includes stop time when present |
nothing calls this directly
no test coverage detected