spark-server/internal/module/inbox/logic/store_test.go
DESKTOP-L8OUL9F\gfl0034 d293de34f5 实现 TCP READ(命令 8),已读水位前进时清未读并通知其他设备。
补上会员价格按平台筛选,并修正广场机器人测试的 Feed 调用,使 go test 能通过。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 18:22:08 +08:00

31 lines
1000 B
Go

package logic
import (
"context"
"testing"
"spark-server/internal/module/inbox/entity"
)
type nopStore struct{}
func (nopStore) TouchUnread(context.Context, int64, int64, int64) error { return nil }
func (nopStore) TouchRead(context.Context, int64, int64, int64) error { return nil }
func (nopStore) IncrUnread(context.Context, int64, int64, int64) error { return nil }
func (nopStore) ClearUnread(context.Context, int64, int64, int64) error { return nil }
func (nopStore) SetPreview(context.Context, int64, []byte) error { return nil }
func (nopStore) ListUpdatedSince(context.Context, int64, int64, int) ([]entity.DialogHit, error) {
return nil, nil
}
func (nopStore) LoadDialogs(context.Context, int64, []entity.DialogHit) ([]entity.Dialog, error) {
return nil, nil
}
func (nopStore) PurgeUser(context.Context, int64) error { return nil }
func TestStoreContract(t *testing.T) {
var s Store = nopStore{}
if err := s.PurgeUser(t.Context(), 1); err != nil {
t.Fatal(err)
}
}