Skip to content

Commit

Permalink
Clean up redundant error checks in msg_nowin_test.go
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wneessen committed Oct 27, 2024
1 parent 3be41b1 commit eed3dec
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions msg_nowin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}

Expand Down Expand Up @@ -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)
}
})
}

Expand Down

0 comments on commit eed3dec

Please sign in to comment.