优化结构
This commit is contained in:
@@ -2,16 +2,15 @@ package system
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kra/internal/biz/system"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
)
|
||||
|
||||
func TestAnnouncementRepositoryKeepsRawIDQuerySemantics(t *testing.T) {
|
||||
data := newTransactionTestData(t)
|
||||
repo := &announcementRepo{data: data}
|
||||
ctx := context.Background()
|
||||
item := &biz.Announcement{Title: "notice"}
|
||||
item := &system.Announcement{Title: "notice"}
|
||||
if err := repo.Create(ctx, item); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -44,7 +43,7 @@ func TestAnnouncementRepositoryPreservesSignedUserID(t *testing.T) {
|
||||
repo := &announcementRepo{data: data}
|
||||
ctx := context.Background()
|
||||
userID := -1
|
||||
item := &biz.Announcement{Title: "notice", UserID: &userID}
|
||||
item := &system.Announcement{Title: "notice", UserID: &userID}
|
||||
if err := repo.Create(ctx, item); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user