blob: 9c6251423a00ed75d722b463f31eb5845e390c3a [file] [log] [blame]
Jon Perritted7055f2015-01-20 19:32:49 -07001package serviceassets
2
3import (
Jon Perrittd3416092015-03-27 10:36:34 -06004 "net/http"
5 "testing"
Jon Perritted7055f2015-01-20 19:32:49 -07006
Jon Perritt27249f42016-02-18 10:35:59 -06007 th "github.com/gophercloud/gophercloud/testhelper"
8 fake "github.com/gophercloud/gophercloud/testhelper/client"
Jon Perritted7055f2015-01-20 19:32:49 -07009)
10
11// HandleDeleteCDNAssetSuccessfully creates an HTTP handler at `/services/{id}/assets` on the test handler mux
12// that responds with a `Delete` response.
13func HandleDeleteCDNAssetSuccessfully(t *testing.T) {
Jon Perrittd3416092015-03-27 10:36:34 -060014 th.Mux.HandleFunc("/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0/assets", func(w http.ResponseWriter, r *http.Request) {
15 th.TestMethod(t, r, "DELETE")
16 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
17 w.WriteHeader(http.StatusAccepted)
18 })
Jon Perritted7055f2015-01-20 19:32:49 -070019}