remove deprecated method Delete Polygon (#41)

This commit is contained in:
Kirill
2023-09-05 23:11:43 +03:00
committed by GitHub
parent 0f1d0410bc
commit 07d38a8456
2 changed files with 0 additions and 69 deletions

View File

@@ -109,48 +109,3 @@ func TestLinkDeliveryMethodToPolygon(t *testing.T) {
}
}
}
func TestDeletePolygon(t *testing.T) {
t.Parallel()
tests := []struct {
statusCode int
headers map[string]string
params *DeletePolygonParams
response string
}{
// Test Ok
{
http.StatusOK,
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
&DeletePolygonParams{
PolygonIds: []int64{1323},
},
`{}`,
},
// Test No Client-Id or Api-Key
{
http.StatusUnauthorized,
map[string]string{},
&DeletePolygonParams{},
`{
"code": 16,
"message": "Client-Id and Api-Key headers are required"
}`,
},
}
for _, test := range tests {
c := NewMockClient(core.NewMockHttpHandler(test.statusCode, test.response, test.headers))
ctx, _ := context.WithTimeout(context.Background(), testTimeout)
resp, err := c.Polygons().Delete(ctx, test.params)
if err != nil {
t.Error(err)
}
if resp.StatusCode != test.statusCode {
t.Errorf("got wrong status code: got: %d, expected: %d", resp.StatusCode, test.statusCode)
}
}
}