use http consts for request methods

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-11-02 23:31:23 +01:00
parent 7f9f86c411
commit f9ccd2c6ea
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
33 changed files with 211 additions and 211 deletions

View file

@ -13,7 +13,7 @@ import (
func TestReturns200IfThereAreNoChecks(t *testing.T) {
recorder := httptest.NewRecorder()
req, err := http.NewRequest("GET", "https://fakeurl.com/debug/health", nil)
req, err := http.NewRequest(http.MethodGet, "https://fakeurl.com/debug/health", nil)
if err != nil {
t.Errorf("Failed to create request.")
}
@ -30,7 +30,7 @@ func TestReturns200IfThereAreNoChecks(t *testing.T) {
func TestReturns503IfThereAreErrorChecks(t *testing.T) {
recorder := httptest.NewRecorder()
req, err := http.NewRequest("GET", "https://fakeurl.com/debug/health", nil)
req, err := http.NewRequest(http.MethodGet, "https://fakeurl.com/debug/health", nil)
if err != nil {
t.Errorf("Failed to create request.")
}