Skip to content

Commit

Permalink
fixing a typo in the new testing assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Rutherford committed Jun 15, 2020
1 parent 3566a5f commit 0ed831d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (h *requiredHeaderValue) Assert(r *http.Request) error {

// Log prints a testing info log for the requiredHeaderValue Assertor
func (h *requiredHeaderValue) Log(t testing.TB) {
t.Logf("Testing request for required header value [%s: %s]", h.Key, h.ExpectedValue)
t.Logf("Testing request for a required header value [%s: %s]", h.Key, h.ExpectedValue)
}

// Error prints a testing error for the requiredHeaderValue Assertor
Expand Down Expand Up @@ -126,7 +126,7 @@ func (q *requiredQueryValue) Assert(r *http.Request) error {

// Log prints a testing info log for the requiredQueryValue Assertor
func (q *requiredQueryValue) Log(t testing.TB) {
t.Logf("Testing request for required query parameter value [%s: %s]", q.Key, q.ExpectedValue)
t.Logf("Testing request for a required query parameter value [%s: %s]", q.Key, q.ExpectedValue)
}

// Error prints a testing error for the requiredQueryValue Assertor
Expand Down Expand Up @@ -161,7 +161,7 @@ func (b *requiredBody) Assert(r *http.Request) error {

// Log prints a testing info log for the requiredBody Assertor
func (b *requiredBody) Log(t testing.TB) {
t.Log("Testing request for required a required body")
t.Log("Testing request for a required body value")
}

// Error prints a testing error for the requiredBody Assertor
Expand Down
6 changes: 3 additions & 3 deletions assertions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func TestAssertors_Log(t *testing.T) {
buf: &bytes.Buffer{},
},
assertor: &requiredHeaderValue{Key: "test-key", ExpectedValue: "test-value"},
expected: "Testing request for required header value [test-key: test-value]",
expected: "Testing request for a required header value [test-key: test-value]",
},
{
name: "requiredQueries Log should log the expected output when called",
Expand All @@ -331,15 +331,15 @@ func TestAssertors_Log(t *testing.T) {
buf: &bytes.Buffer{},
},
assertor: &requiredQueryValue{Key: "test-key", ExpectedValue: "test-value"},
expected: "Testing request for required query parameter value [test-key: test-value]",
expected: "Testing request for a required query parameter value [test-key: test-value]",
},
{
name: "requiredBody Log should log the expected output when called",
mockTester: &mockTester{
buf: &bytes.Buffer{},
},
assertor: &requiredBody{},
expected: "Testing request for required a required body\n",
expected: "Testing request for a required body value\n",
},
}
for _, tt := range tests {
Expand Down

0 comments on commit 0ed831d

Please sign in to comment.