(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestDeleteManyCollectionObjects(t *testing.T) { |
| 101 | ctx := context.Background() |
| 102 | client, requester := newClient(t) |
| 103 | testCases := []struct { |
| 104 | ids []string |
| 105 | collection string |
| 106 | expectedURL string |
| 107 | }{ |
| 108 | { |
| 109 | collection: "test-single", |
| 110 | ids: []string{"one"}, |
| 111 | expectedURL: "https://api.stream-io-api.com/api/v1.0/collections/?api_key=key&collection_name=test-single&ids=one", |
| 112 | }, |
| 113 | { |
| 114 | collection: "test-many", |
| 115 | ids: []string{"one", "two", "three"}, |
| 116 | expectedURL: "https://api.stream-io-api.com/api/v1.0/collections/?api_key=key&collection_name=test-many&ids=one%2Ctwo%2Cthree", |
| 117 | }, |
| 118 | } |
| 119 | for _, tc := range testCases { |
| 120 | _, err := client.Collections().DeleteMany(ctx, tc.collection, tc.ids...) |
| 121 | require.NoError(t, err) |
| 122 | testRequest(t, requester.req, http.MethodDelete, tc.expectedURL, "") |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | func TestGetCollectionObject(t *testing.T) { |
| 127 | ctx := context.Background() |
nothing calls this directly
no test coverage detected