blob: 38e7fc55f8da75cce50398946b338824b8337a55 [file] [log] [blame]
Jon Perritted7055f2015-01-20 19:32:49 -07001package serviceassets
2
3import (
4 "net/http"
5 "testing"
6
7 th "github.com/rackspace/gophercloud/testhelper"
8 fake "github.com/rackspace/gophercloud/testhelper/client"
9)
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) {
14 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 })
19}