mirror of
https://github.com/mattermost/mattermost.git
synced 2026-04-15 22:12:19 -04:00
* Add unit tests for ScheduledPost model Cover all methods: BaseIsValid, IsValid, PreSave, PreUpdate, ToPost, Auditable, RestoreNonUpdatableFields, SanitizeInput, and GetPriority. Includes validation branch coverage through Draft delegation chain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address review findings for ScheduledPost tests - Use require.Nil on valid-path validation checks (match post_test.go) - Use require.Error/require.Nil on error-path ToPost subtests - Add require.NotNil guards for inner pointer fields before dereference - Add ToPost test for non-nil Metadata with empty Priority Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix typo in ScheduledPost.ToPost comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Seed real metadata fields in ToPost preservation tests Populate Embeds in both metadata subtests and assert they survive ToPost(), catching any replacement of the metadata struct. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Improve ScheduledPost Auditable metadata test to verify content preservation Seed a real PostMetadata with an emoji and assert the auditable output matches metadata.Auditable() instead of just checking non-nil. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| model | ||
| plugin | ||
| pluginapi | ||
| shared | ||
| utils | ||
| go.mod | ||
| go.sum | ||
| LICENSE.txt | ||
| Makefile | ||