X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/fd740bc499ebc6d3a381479316f74cdc736d02de..3e4a52ed34b130743164d6d77f31a1fc67f161c8:/hotline/file_transfer_test.go?ds=sidebyside diff --git a/hotline/file_transfer_test.go b/hotline/file_transfer_test.go index b1236b6..0b549f8 100644 --- a/hotline/file_transfer_test.go +++ b/hotline/file_transfer_test.go @@ -4,7 +4,6 @@ import ( "encoding/binary" "github.com/stretchr/testify/assert" "io" - "reflect" "testing" ) @@ -127,7 +126,7 @@ func TestNewFileHeader(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := NewFileHeader(tt.args.fileName, tt.args.isDir); !reflect.DeepEqual(got, tt.want) { + if got := NewFileHeader(tt.args.fileName, tt.args.isDir); !assert.Equal(t, tt.want, got) { t.Errorf("NewFileHeader() = %v, want %v", got, tt.want) } }) @@ -170,7 +169,7 @@ func TestFileHeader_Payload(t *testing.T) { FilePath: tt.fields.FilePath, } got, _ := io.ReadAll(fh) - if !reflect.DeepEqual(got, tt.want) { + if !assert.Equal(t, tt.want, got) { t.Errorf("Read() = %v, want %v", got, tt.want) } })