Clean up redundant error checks in msg_nowin_test.go

Removed unnecessary assertions for specific error types in test cases. This streamlines the tests, maintaining focus on the primary failure conditions without checking the error type.
This commit is contained in:
Winni Neessen 2024-10-27 16:19:16 +01:00
parent 3be41b1aea
commit eed3dec7d6
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -79,9 +79,6 @@ func TestMsg_AttachFile_unixOnly(t *testing.T) {
if err == nil {
t.Error("writer func expected to fail, but didn't")
}
if !errors.Is(err, os.ErrClosed) {
t.Errorf("expected error to be %s, got: %s", os.ErrClosed, err)
}
})
}
@ -128,9 +125,6 @@ func TestMsg_AttachReader_unixOnly(t *testing.T) {
if err == nil {
t.Error("writer func expected to fail, but didn't")
}
if !errors.Is(err, os.ErrClosed) {
t.Errorf("expected error to be %s, got: %s", os.ErrClosed, err)
}
})
}