fixed doc env vars + mongo v2 migration
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
||||
mmail "github.com/tech/sendico/notification/internal/server/notificationimp/mail/messagebuilder"
|
||||
"github.com/tech/sendico/pkg/db/storable"
|
||||
"github.com/tech/sendico/pkg/domainprovider"
|
||||
mlogger "github.com/tech/sendico/pkg/mlogger/factory"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"github.com/tech/sendico/pkg/mlogger/factory"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
// Mock implementations
|
||||
@@ -129,11 +129,11 @@ type mockMessage struct {
|
||||
parameters map[string]any
|
||||
}
|
||||
|
||||
func (m *mockMessage) AccountID() string { return m.accountID }
|
||||
func (m *mockMessage) TemplateID() string { return m.templateID }
|
||||
func (m *mockMessage) Locale() string { return m.locale }
|
||||
func (m *mockMessage) Recipients() []string { return m.recipients }
|
||||
func (m *mockMessage) Parameters() map[string]any { return m.parameters }
|
||||
func (m *mockMessage) AccountID() string { return m.accountID }
|
||||
func (m *mockMessage) TemplateID() string { return m.templateID }
|
||||
func (m *mockMessage) Locale() string { return m.locale }
|
||||
func (m *mockMessage) Recipients() []string { return m.recipients }
|
||||
func (m *mockMessage) Parameters() map[string]any { return m.parameters }
|
||||
func (m *mockMessage) Body(l localizer.Localizer, dp domainprovider.DomainProvider) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
@@ -177,7 +177,7 @@ func TestOnAccount_ValidAccount_SendsWelcomeEmail(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
@@ -231,7 +231,7 @@ func TestOnAccount_LinkGenerationFails_ReturnsError(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
@@ -274,7 +274,7 @@ func TestOnAccount_SendFails_ReturnsError(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
@@ -311,7 +311,7 @@ func TestOnInvitation_ValidInvitation_SendsInvitationEmail(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Inviter User",
|
||||
@@ -323,7 +323,7 @@ func TestOnInvitation_ValidInvitation_SendsInvitationEmail(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
invitationID := primitive.NewObjectID()
|
||||
invitationID := bson.NewObjectID()
|
||||
invitation := &model.Invitation{}
|
||||
invitation.ID = invitationID
|
||||
invitation.Content.Email = "invitee@example.com"
|
||||
@@ -375,7 +375,7 @@ func TestOnInvitation_LinkGenerationFails_ReturnsError(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Inviter User",
|
||||
@@ -387,7 +387,7 @@ func TestOnInvitation_LinkGenerationFails_ReturnsError(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
invitationID := primitive.NewObjectID()
|
||||
invitationID := bson.NewObjectID()
|
||||
invitation := &model.Invitation{}
|
||||
invitation.ID = invitationID
|
||||
invitation.Content.Email = "invitee@example.com"
|
||||
@@ -420,7 +420,7 @@ func TestOnPasswordReset_ValidReset_SendsResetEmail(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
@@ -478,7 +478,7 @@ func TestOnPasswordReset_LinkGenerationFails_ReturnsError(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
@@ -520,7 +520,7 @@ func TestOnPasswordReset_SendFails_ReturnsError(t *testing.T) {
|
||||
AccountPublic: model.AccountPublic{
|
||||
AccountBase: model.AccountBase{
|
||||
Base: storable.Base{
|
||||
ID: primitive.NewObjectID(),
|
||||
ID: bson.NewObjectID(),
|
||||
},
|
||||
Describable: model.Describable{
|
||||
Name: "Test User",
|
||||
|
||||
Reference in New Issue
Block a user