tsk-58: Update names of Contact endpoint (#67)
Closes #58 Reviewed-on: phoenix/textsender-api#67 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -16,11 +16,6 @@ import (
|
||||
"git.kundeng.us/phoenix/textsender-api/internal/store/mock"
|
||||
)
|
||||
|
||||
type CreateMessageRequest struct {
|
||||
Content string `json:"content"`
|
||||
UserId uuid.UUID `json:"user_id"`
|
||||
}
|
||||
|
||||
func TestCreateMessageWithMock(t *testing.T) {
|
||||
mockStore := mock.NewMockMessageStore()
|
||||
apiApp, err := GetApp()
|
||||
@@ -28,7 +23,7 @@ func TestCreateMessageWithMock(t *testing.T) {
|
||||
handler := NewMessageHandler(apiApp, mockStore)
|
||||
|
||||
testUserId := uuid.New()
|
||||
testBody := CreateMessageRequest{Content: "Who could tell?", UserId: testUserId}
|
||||
testBody := RequestAddMessage{Content: "Who could tell?", UserId: testUserId}
|
||||
jsonValue, _ := json.Marshal(testBody)
|
||||
|
||||
req, _ := http.NewRequest("POST", endpoint.ADD_MESSAGE, strings.NewReader(string(jsonValue)))
|
||||
|
||||
Reference in New Issue
Block a user