Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
@@ -0,0 +1,27 @@
package vidser
import (
"testing"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func TestApplyScheduledVideoModuleID(t *testing.T) {
moduleID := primitive.NewObjectID()
update := bson.M{}
applyScheduledVideoModuleID(update, moduleID)
if got := update["mId"]; got != moduleID.Hex() {
t.Fatalf("mId = %v, want %s", got, moduleID.Hex())
}
}
func TestApplyScheduledVideoModuleIDIgnoresEmptyID(t *testing.T) {
update := bson.M{}
applyScheduledVideoModuleID(update, primitive.NilObjectID)
if _, ok := update["mId"]; ok {
t.Fatal("empty module id must not be written")
}
}