Posting to a configuration sets it so that you can get it again.
(t *testing.T)
| 93 | |
| 94 | // Posting to a configuration sets it so that you can get it again. |
| 95 | func Test_PostConfig_CreatesConfig(t *testing.T) { |
| 96 | setup(t) |
| 97 | defer cleanup(t) |
| 98 | |
| 99 | userID := makeUserID() |
| 100 | config := makeConfig() |
| 101 | for _, c := range allClients { |
| 102 | { |
| 103 | w := requestAsUser(t, userID, "POST", c.Endpoint, "", readerFromConfig(t, config)) |
| 104 | assert.Equal(t, http.StatusNoContent, w.Code) |
| 105 | } |
| 106 | { |
| 107 | w := requestAsUser(t, userID, "GET", c.Endpoint, "", nil) |
| 108 | assert.Equal(t, config, parseView(t, w.Body.Bytes()).Config) |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | // Posting to a configuration sets it so that you can get it again. |
| 114 | func Test_PostConfig_UpdatesConfig(t *testing.T) { |
nothing calls this directly
no test coverage detected