refactor(msg): tests - update data/ennoblements - add check if r.Method == "GET"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fca59c0a56
commit
419c23673d
|
@ -79,6 +79,11 @@ func TestUpdateData(t *testing.T) {
|
|||
|
||||
// client
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
|
||||
url, err := urlpkg.Parse(r.URL.Query().Get("url"))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
|
@ -318,6 +323,11 @@ func TestUpdateEnnoblements(t *testing.T) {
|
|||
|
||||
// client
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
|
||||
url, err := urlpkg.Parse(r.URL.Query().Get("url"))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
|
|
Reference in New Issue
Block a user