Skip to content

Commit

Permalink
changed variables because of the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
trapacska committed Feb 14, 2024
1 parent f818c42 commit a6f2e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filedownloader/filedownloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Test_get_InvalidStatusCode_NoBody(t *testing.T) {
path := givenTempPath(t)
url := "http://url.com"
statusCode := 404
expectedErr := fmt.Errorf("unable to download file from: %s. Status code: %d. Response: HTTP/0.0 404 Not Found\r\nContent-Length: 0\r\n\r\n", url, statusCode)
expectedErrString := fmt.Sprintf("unable to download file from: %s. Status code: %d. Response: HTTP/0.0 404 Not Found\r\nContent-Length: 0\r\n\r\n", url, statusCode)
mockedHTTPClient := givenHTTPClient(
http.Response{
StatusCode: statusCode,
Expand All @@ -52,7 +52,7 @@ func Test_get_InvalidStatusCode_NoBody(t *testing.T) {
err := downloader.Get(path, url)

// Then
require.Equal(t, expectedErr, err)
require.Equal(t, errors.New(expectedErrString).Error(), err.Error())
assertFileNotExists(t, path)
}

Expand Down

0 comments on commit a6f2e15

Please sign in to comment.