GetAllConfigs returns an empty list of configs if there aren't any.
(t *testing.T)
| 145 | |
| 146 | // GetAllConfigs returns an empty list of configs if there aren't any. |
| 147 | func Test_GetAllConfigs_Empty(t *testing.T) { |
| 148 | setup(t) |
| 149 | defer cleanup(t) |
| 150 | |
| 151 | for _, c := range allClients { |
| 152 | w := request(t, "GET", c.PrivateEndpoint, nil) |
| 153 | assert.Equal(t, http.StatusOK, w.Code) |
| 154 | var found ConfigsView |
| 155 | err := json.Unmarshal(w.Body.Bytes(), &found) |
| 156 | assert.NoError(t, err, "Could not unmarshal JSON") |
| 157 | assert.Equal(t, ConfigsView{Configs: map[string]userconfig.View{}}, found) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | // GetAllConfigs returns all created userconfig. |
| 162 | func Test_GetAllConfigs(t *testing.T) { |