]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers_test.go
Add missing error handling and logging (#109)
[rbdr/mobius] / hotline / transaction_handlers_test.go
index ff1a53c37d08ea2243d38428e112779e4f9a5d48..525bb8895efe51fc5a391e0367535ba4aefff4b5 100644 (file)
@@ -2438,7 +2438,7 @@ func TestHandleSendInstantMsg(t *testing.T) {
                                        },
                                },
                        },
-                       wantErr: assert.NoError,
+                       wantErr: assert.Error,
                },
                {
                        name: "when client 1 sends a message to client 2",
@@ -2980,7 +2980,7 @@ func TestHandleGetClientInfoText(t *testing.T) {
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
                                                NewField(FieldData, []byte(
-                                                       strings.Replace(`Nickname:   Testy McTest
+                                                       strings.ReplaceAll(`Nickname:   Testy McTest
 Name:       test
 Account:    test
 Address:    1.2.3.4:12345
@@ -3005,7 +3005,7 @@ None.
 
 None.
 
-`, "\n", "\r", -1)),
+`, "\n", "\r")),
                                                ),
                                                NewField(FieldUserName, []byte("Testy McTest")),
                                        },