Debian Codegraph @

fastly/purge_test.go

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 package fastly
2
3 import "testing"
4
5 func TestClient_Purge(t *testing.T) {
6 t.Parallel()
7
8 var err error
9 var purge *Purge
10 record(t, "purges/purge_by_key", func(c *Client) {
11 purge, err = c.PurgeKey(&PurgeKeyInput{
12 Service: testServiceID,
13 Key: "foo",
14 })
15 })
16 if err != nil {
17 t.Fatal(err)
18 }
19
20 if purge.Status != "ok" {
21 t.Error("bad status")
22 }
23 if len(purge.ID) == 0 {
24 t.Error("bad id")
25 }
26 }