| 1 | package dnsimplescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ |
| 2 | |
| 3 | import ( |
| 4 | "contextscip-go gomod github.com/golang/go/src go1.21 context/" |
| 5 | "ioscip-go gomod github.com/golang/go/src go1.21 io/" |
| 6 | "net/httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/" |
| 7 | "net/urlscip-go gomod github.com/golang/go/src go1.21 `net/url`/" |
| 8 | "testingscip-go gomod github.com/golang/go/src go1.21 testing/" |
| 9 | |
| 10 | "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/" |
| 11 | ) |
| 12 | |
| 13 | func TestDomainPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainPath().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 14 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, "/1010/domains", domainPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainPath().("1010", "")) |
| 15 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, "/1010/domains/example.com", domainPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainPath().("1010", "example.com")) |
| 16 | } |
| 17 | |
| 18 | func TestDomainsService_ListDomainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_ListDomains().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 19 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 20 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 21 | |
| 22 | muxscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/mux..HandleFuncscip-go gomod github.com/golang/go/src go1.21 `net/http`/ServeMux#HandleFunc().("/v2/1385/domains", func(w httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.ResponseWriterscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#, r *httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.21 `net/http`/Request#) { |
| 23 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/listDomains/success.http") |
| 24 | |
| 25 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "GET") |
| 26 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 27 | testQueryscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testQuery().(t, r, urlscip-go gomod github.com/golang/go/src go1.21 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.21 `net/url`/Values#{}) |
| 28 | |
| 29 | w.WriteHeaderscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#WriteHeader().(httpResponse.StatusCodescip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#StatusCode.) |
| 30 | _, _ = ioscip-go gomod github.com/golang/go/src go1.21 io/.Copyscip-go gomod github.com/golang/go/src go1.21 io/Copy().(w, httpResponse.Bodyscip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#Body.) |
| 31 | }) |
| 32 | |
| 33 | domainsResponse, err := clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/client..Domainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#Domains..ListDomainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#ListDomains().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), "1385", nil) |
| 34 | |
| 35 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err) |
| 36 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, &Paginationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Pagination#{CurrentPagescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Pagination#CurrentPage.: 1, PerPagescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Pagination#PerPage.: 30, TotalPagesscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Pagination#TotalPages.: 1, TotalEntriesscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Pagination#TotalEntries.: 2}, domainsResponse.Paginationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Response#Pagination.) |
| 37 | domains := domainsResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsResponse#Data. |
| 38 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Lenscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Len().(t, domains, 2) |
| 39 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, int64(181984), domains[0].IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#ID.) |
| 40 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, "example-alpha.com", domains[0].Namescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#Name.) |
| 41 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, "2021-06-05T02:15:00Z", domains[0].ExpiresAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#ExpiresAt.) |
| 42 | } |
| 43 | |
| 44 | func TestDomainsService_ListDomains_WithOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_ListDomains_WithOptions().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 45 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 46 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 47 | |
| 48 | muxscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/mux..HandleFuncscip-go gomod github.com/golang/go/src go1.21 `net/http`/ServeMux#HandleFunc().("/v2/1010/domains", func(w httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.ResponseWriterscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#, r *httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.21 `net/http`/Request#) { |
| 49 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/listDomains/success.http") |
| 50 | |
| 51 | testQueryscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testQuery().(t, r, urlscip-go gomod github.com/golang/go/src go1.21 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.21 `net/url`/Values#{ |
| 52 | "page": []string{"2"}, |
| 53 | "per_page": []string{"20"}, |
| 54 | "sort": []string{"name,expiration:desc"}, |
| 55 | "name_like": []string{"example"}, |
| 56 | "registrant_id": []string{"10"}, |
| 57 | }) |
| 58 | |
| 59 | w.WriteHeaderscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#WriteHeader().(httpResponse.StatusCodescip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#StatusCode.) |
| 60 | _, _ = ioscip-go gomod github.com/golang/go/src go1.21 io/.Copyscip-go gomod github.com/golang/go/src go1.21 io/Copy().(w, httpResponse.Bodyscip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#Body.) |
| 61 | }) |
| 62 | |
| 63 | _, err := clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/client..Domainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#Domains..ListDomainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#ListDomains().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), "1010", &DomainListOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainListOptions#{NameLikescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainListOptions#NameLike.: Stringscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/String().("example"), RegistrantIDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainListOptions#RegistrantID.: Intscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Int().(10), ListOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainListOptions#ListOptions.: ListOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ListOptions#{Pagescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ListOptions#Page.: Intscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Int().(2), PerPagescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ListOptions#PerPage.: Intscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Int().(20), Sortscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ListOptions#Sort.: Stringscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/String().("name,expiration:desc")}}) |
| 64 | |
| 65 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err) |
| 66 | } |
| 67 | |
| 68 | func TestDomainsService_CreateDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_CreateDomain().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 69 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 70 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 71 | |
| 72 | muxscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/mux..HandleFuncscip-go gomod github.com/golang/go/src go1.21 `net/http`/ServeMux#HandleFunc().("/v2/1385/domains", func(w httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.ResponseWriterscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#, r *httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.21 `net/http`/Request#) { |
| 73 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/createDomain/created.http") |
| 74 | |
| 75 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "POST") |
| 76 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 77 | |
| 78 | want := map[string]interface{}{"name": "example-beta.com"} |
| 79 | testRequestJSONscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testRequestJSON().(t, r, want) |
| 80 | |
| 81 | w.WriteHeaderscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#WriteHeader().(httpResponse.StatusCodescip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#StatusCode.) |
| 82 | _, _ = ioscip-go gomod github.com/golang/go/src go1.21 io/.Copyscip-go gomod github.com/golang/go/src go1.21 io/Copy().(w, httpResponse.Bodyscip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#Body.) |
| 83 | }) |
| 84 | |
| 85 | accountID := "1385" |
| 86 | domainAttributes := Domainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#{Namescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#Name.: "example-beta.com"} |
| 87 | |
| 88 | domainResponse, err := clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/client..Domainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#Domains..CreateDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#CreateDomain().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, domainAttributes) |
| 89 | |
| 90 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err) |
| 91 | domain := domainResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainResponse#Data. |
| 92 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, int64(181985), domain.IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#ID.) |
| 93 | } |
| 94 | |
| 95 | func TestDomainsService_GetDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_GetDomain().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 96 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 97 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 98 | |
| 99 | muxscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/mux..HandleFuncscip-go gomod github.com/golang/go/src go1.21 `net/http`/ServeMux#HandleFunc().("/v2/1010/domains/example-alpha.com", func(w httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.ResponseWriterscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#, r *httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.21 `net/http`/Request#) { |
| 100 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/getDomain/success.http") |
| 101 | |
| 102 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "GET") |
| 103 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 104 | |
| 105 | w.WriteHeaderscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#WriteHeader().(httpResponse.StatusCodescip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#StatusCode.) |
| 106 | _, _ = ioscip-go gomod github.com/golang/go/src go1.21 io/.Copyscip-go gomod github.com/golang/go/src go1.21 io/Copy().(w, httpResponse.Bodyscip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#Body.) |
| 107 | }) |
| 108 | |
| 109 | accountID := "1010" |
| 110 | |
| 111 | domainResponse, err := clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/client..Domainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#Domains..GetDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#GetDomain().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, "example-alpha.com") |
| 112 | |
| 113 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err) |
| 114 | domain := domainResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainResponse#Data. |
| 115 | wantSingle := &Domainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#{ |
| 116 | IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#ID.: 181984, |
| 117 | AccountIDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#AccountID.: 1385, |
| 118 | RegistrantIDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#RegistrantID.: 2715, |
| 119 | Namescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#Name.: "example-alpha.com", |
| 120 | UnicodeNamescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#UnicodeName.: "example-alpha.com", |
| 121 | Tokenscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#Token.: "", |
| 122 | Statescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#State.: "registered", |
| 123 | AutoRenewscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#AutoRenew.: false, |
| 124 | PrivateWhoisscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#PrivateWhois.: false, |
| 125 | ExpiresAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#ExpiresAt.: "2021-06-05T02:15:00Z", |
| 126 | CreatedAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#CreatedAt.: "2020-06-04T19:15:14Z", |
| 127 | UpdatedAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Domain#UpdatedAt.: "2020-06-04T19:15:21Z"} |
| 128 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, wantSingle, domain) |
| 129 | } |
| 130 | |
| 131 | func TestDomainsService_DeleteDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_DeleteDomain().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 132 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 133 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 134 | |
| 135 | muxscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/mux..HandleFuncscip-go gomod github.com/golang/go/src go1.21 `net/http`/ServeMux#HandleFunc().("/v2/1010/domains/example.com", func(w httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.ResponseWriterscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#, r *httpscip-go gomod github.com/golang/go/src go1.21 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.21 `net/http`/Request#) { |
| 136 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/deleteDomain/success.http") |
| 137 | |
| 138 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "DELETE") |
| 139 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 140 | |
| 141 | w.WriteHeaderscip-go gomod github.com/golang/go/src go1.21 `net/http`/ResponseWriter#WriteHeader().(httpResponse.StatusCodescip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#StatusCode.) |
| 142 | _, _ = ioscip-go gomod github.com/golang/go/src go1.21 io/.Copyscip-go gomod github.com/golang/go/src go1.21 io/Copy().(w, httpResponse.Bodyscip-go gomod github.com/golang/go/src go1.21 `net/http`/Response#Body.) |
| 143 | }) |
| 144 | |
| 145 | accountID := "1010" |
| 146 | |
| 147 | _, err := clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/client..Domainsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#Domains..DeleteDomainscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#DeleteDomain().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, "example.com") |
| 148 | |
| 149 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err) |
| 150 | } |