Skip to content

Commit

Permalink
Declare reader inline
Browse files Browse the repository at this point in the history
  • Loading branch information
rockstaedt committed Oct 24, 2023
1 parent f7abe65 commit 77d1624
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func TestValidate(t *testing.T) {

t.Run("user confirms abort", func(t *testing.T) {
buffer.Reset()
reader := bytes.NewReader([]byte("y"))
handler.Reader = reader
handler.Reader = bytes.NewReader([]byte("y"))

status := handler.Run("validate")

Expand All @@ -61,8 +60,7 @@ func TestValidate(t *testing.T) {
})
t.Run("user declines abort", func(t *testing.T) {
buffer.Reset()
reader := bytes.NewReader([]byte("n"))
handler.Reader = reader
handler.Reader = bytes.NewReader([]byte("n"))

status := handler.Run("validate")

Expand Down

0 comments on commit 77d1624

Please sign in to comment.