| 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 TestCollaboratorPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestCollaboratorPath().(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/example.com/collaborators", collaboratorPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/collaboratorPath().("1010", "example.com", 0)) |
| 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/collaborators/2", collaboratorPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/collaboratorPath().("1010", "example.com", 2)) |
| 16 | } |
| 17 | |
| 18 | func TestDomainsService_ListCollaboratorsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_ListCollaborators().(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/1010/domains/example.com/collaborators", 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/listCollaborators/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 | |
| 28 | 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.) |
| 29 | _, _ = 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.) |
| 30 | }) |
| 31 | |
| 32 | collaboratorsResponse, 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..ListCollaboratorsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#ListCollaborators().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), "1010", "example.com", nil) |
| 33 | |
| 34 | 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) |
| 35 | 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}, collaboratorsResponse.Paginationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Response#Pagination.) |
| 36 | collaborators := collaboratorsResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorsResponse#Data. |
| 37 | 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, collaborators, 2) |
| 38 | 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(100), collaborators[0].IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#ID.) |
| 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, "example.com", collaborators[0].DomainNamescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#DomainName.) |
| 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, int64(999), collaborators[0].UserIDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#UserID.) |
| 41 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, collaborators[0].Invitationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#Invitation.) |
| 42 | } |
| 43 | |
| 44 | func TestDomainsService_ListCollaborators_WithOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_ListCollaborators_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/example.com/collaborators", 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/listCollaborators/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#{"page": []string{"2"}, "per_page": []string{"20"}}) |
| 52 | |
| 53 | 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.) |
| 54 | _, _ = 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.) |
| 55 | }) |
| 56 | |
| 57 | _, 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..ListCollaboratorsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#ListCollaborators().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), "1010", "example.com", &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)}) |
| 58 | |
| 59 | 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) |
| 60 | } |
| 61 | |
| 62 | func TestDomainsService_AddCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_AddCollaborator().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 63 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 64 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 65 | |
| 66 | 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/collaborators", 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#) { |
| 67 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/addCollaborator/success.http") |
| 68 | |
| 69 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "POST") |
| 70 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 71 | |
| 72 | want := map[string]interface{}{"email": "[email protected]"} |
| 73 | testRequestJSONscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testRequestJSON().(t, r, want) |
| 74 | |
| 75 | 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.) |
| 76 | _, _ = 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.) |
| 77 | }) |
| 78 | |
| 79 | accountID := "1010" |
| 80 | domainID := "example.com" |
| 81 | collaboratorAttributes := CollaboratorAttributesscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorAttributes#{Emailscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorAttributes#Email.: "[email protected]"} |
| 82 | |
| 83 | collaboratorResponse, 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..AddCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#AddCollaborator().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, domainID, collaboratorAttributes) |
| 84 | |
| 85 | 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) |
| 86 | collaborator := collaboratorResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorResponse#Data. |
| 87 | 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(100), collaborator.IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#ID.) |
| 88 | 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.com", collaborator.DomainNamescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#DomainName.) |
| 89 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, collaborator.Invitationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#Invitation.) |
| 90 | 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, "2016-10-07T08:53:41Z", collaborator.AcceptedAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#AcceptedAt.) |
| 91 | } |
| 92 | |
| 93 | func TestDomainsService_AddNonExistingCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_AddNonExistingCollaborator().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 94 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 95 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 96 | |
| 97 | 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/collaborators", 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#) { |
| 98 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/addCollaborator/invite-success.http") |
| 99 | |
| 100 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "POST") |
| 101 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 102 | |
| 103 | want := map[string]interface{}{"email": "[email protected]"} |
| 104 | testRequestJSONscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testRequestJSON().(t, r, want) |
| 105 | |
| 106 | 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.) |
| 107 | _, _ = 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.) |
| 108 | }) |
| 109 | |
| 110 | accountID := "1010" |
| 111 | domainID := "example.com" |
| 112 | collaboratorAttributes := CollaboratorAttributesscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorAttributes#{Emailscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorAttributes#Email.: "[email protected]"} |
| 113 | |
| 114 | collaboratorResponse, 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..AddCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#AddCollaborator().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, domainID, collaboratorAttributes) |
| 115 | |
| 116 | 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) |
| 117 | collaborator := collaboratorResponse.Datascip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/CollaboratorResponse#Data. |
| 118 | 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(101), collaborator.IDscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#ID.) |
| 119 | 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.com", collaborator.DomainNamescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#DomainName.) |
| 120 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Truescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/True().(t, collaborator.Invitationscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#Invitation.) |
| 121 | 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, "", collaborator.AcceptedAtscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Collaborator#AcceptedAt.) |
| 122 | } |
| 123 | |
| 124 | func TestDomainsService_RemoveCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/TestDomainsService_RemoveCollaborator().(t *testingscip-go gomod github.com/golang/go/src go1.21 testing/.Tscip-go gomod github.com/golang/go/src go1.21 testing/T#) { |
| 125 | setupMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/setupMockServer().() |
| 126 | defer teardownMockServerscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/teardownMockServer().() |
| 127 | |
| 128 | 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/collaborators/100", 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#) { |
| 129 | httpResponse := httpResponseFixturescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/httpResponseFixture().(t, "/api/removeCollaborator/success.http") |
| 130 | |
| 131 | testMethodscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testMethod().(t, r, "DELETE") |
| 132 | testHeadersscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/testHeaders().(t, r) |
| 133 | |
| 134 | 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.) |
| 135 | _, _ = 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.) |
| 136 | }) |
| 137 | |
| 138 | accountID := "1010" |
| 139 | domainID := "example.com" |
| 140 | collaboratorID := int64(100) |
| 141 | |
| 142 | _, 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..RemoveCollaboratorscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainsService#RemoveCollaborator().(contextscip-go gomod github.com/golang/go/src go1.21 context/.Backgroundscip-go gomod github.com/golang/go/src go1.21 context/Background().(), accountID, domainID, collaboratorID) |
| 143 | |
| 144 | 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) |
| 145 | } |