convert query parameters to lowercase before reading them
This commit is contained in:
parent
477c9d3ed5
commit
e3656d04dd
2 changed files with 18 additions and 1 deletions
|
@ -309,6 +309,18 @@ func TestServer_PublishGETOnlyOneTopic(t *testing.T) {
|
|||
require.Equal(t, 404, response.Code)
|
||||
}
|
||||
|
||||
func TestServer_PublishCaseInsensitiveQueryParam(t *testing.T) {
|
||||
s := newTestServer(t, newTestConfig(t))
|
||||
response := request(t, s, "GET", "/mytopic/publish?MESSAGE=testing", "", nil)
|
||||
require.Equal(t, "testing", toMessage(t, response.Body.String()).Message)
|
||||
}
|
||||
|
||||
func TestServer_PublishInvalidQueryParam(t *testing.T) {
|
||||
s := newTestServer(t, newTestConfig(t))
|
||||
response := request(t, s, "GET", "/mytopic/publish?MESSAGE=testing&fakeParam=test", "", nil)
|
||||
require.Equal(t, "testing", toMessage(t, response.Body.String()).Message)
|
||||
}
|
||||
|
||||
func TestServer_PublishNoCache(t *testing.T) {
|
||||
s := newTestServer(t, newTestConfig(t))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue