补上会员价格按平台筛选,并修正广场机器人测试的 Feed 调用,使 go test 能通过。 Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
1000 B
Go
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)
|
|
}
|
|
}
|