tsk-24: Fixed tests (#25)
Closes #24 Reviewed-on: phoenix/textsender-api#25 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-api/internal/handler/endpoint"
|
||||
"git.kundeng.us/phoenix/textsender-api/internal/store/mock"
|
||||
)
|
||||
|
||||
type CreateScheduledMessageEventRequest struct {
|
||||
@@ -26,10 +27,11 @@ type CreateScheduledMessageEventRequest struct {
|
||||
func TestCreateScheduledMessageEventWithMock(t *testing.T) {
|
||||
now := time.Now()
|
||||
|
||||
mockStore := NewMockScheduledMessageEventStore()
|
||||
contactStore := NewMockContactStore()
|
||||
messageStore := NewMockMessageStore()
|
||||
schMsgStore := NewMockScheduledMessageStore()
|
||||
mockStore := mock.NewMockScheduledMessageEventStore()
|
||||
contactStore := mock.NewMockContactStore()
|
||||
messageStore := mock.NewMockMessageStore()
|
||||
schMsgStore := mock.NewMockScheduledMessageStore()
|
||||
|
||||
handler := NewScheduledMessageEventHandler(mockStore)
|
||||
|
||||
recipientId := uuid.New()
|
||||
@@ -50,7 +52,7 @@ func TestCreateScheduledMessageEventWithMock(t *testing.T) {
|
||||
schMsg := scheduling.ScheduledMessage{}
|
||||
schMsg.Id = scheduledMessageId
|
||||
schMsg.UserId = testUserId
|
||||
schMsg.Scheduled = now.Add(20*time.Minute)
|
||||
schMsg.Scheduled = now.Add(20 * time.Minute)
|
||||
|
||||
ctx := t.Context()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user