]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers_test.go
Simplify news article timestamping
[rbdr/mobius] / hotline / transaction_handlers_test.go
index 56968a1e1f0b4e48797766e836964e83b5716cb5..7c5ee43268cad1433177115e637cafb5832bf656 100644 (file)
@@ -5,7 +5,6 @@ import (
        "io/fs"
        "math/rand"
        "os"
-       "reflect"
        "testing"
 )
 
@@ -227,12 +226,21 @@ func TestHandleGetUserNameList(t *testing.T) {
                                                                Icon:     &[]byte{0, 2},
                                                                Flags:    &[]byte{0, 3},
                                                                UserName: []byte{0, 4},
+                                                               Agreed:   true,
                                                        },
                                                        uint16(2): {
                                                                ID:       &[]byte{0, 2},
                                                                Icon:     &[]byte{0, 2},
                                                                Flags:    &[]byte{0, 3},
                                                                UserName: []byte{0, 4},
+                                                               Agreed:   true,
+                                                       },
+                                                       uint16(3): {
+                                                               ID:       &[]byte{0, 3},
+                                                               Icon:     &[]byte{0, 2},
+                                                               Flags:    &[]byte{0, 3},
+                                                               UserName: []byte{0, 4},
+                                                               Agreed:   false,
                                                        },
                                                },
                                        },
@@ -272,9 +280,7 @@ func TestHandleGetUserNameList(t *testing.T) {
                                t.Errorf("HandleGetUserNameList() error = %v, wantErr %v", err, tt.wantErr)
                                return
                        }
-                       if !reflect.DeepEqual(got, tt.want) {
-                               t.Errorf("HandleGetUserNameList() got = %v, want %v", got, tt.want)
-                       }
+                       assert.Equal(t, tt.want, got)
                })
        }
 }