Added test to check that the key is decoded as expected

This commit is contained in:
Andrei Savu 2012-03-14 22:15:08 +02:00
parent 3b07075d40
commit 8b8b1073f2
1 changed files with 8 additions and 0 deletions

View File

@ -147,4 +147,12 @@ public class ModifyRequestTest {
assertEquals(parsedMap.get("publickey"), expected); assertEquals(parsedMap.get("publickey"), expected);
} }
@Test
public void testParseQueryWithKeysThatRequireDecoding() {
Multimap<String, String> parsedMap = parseQueryToMap("network%5B0%5D.id=23&network%5B0%5D.address=192.168.0.1");
assertEquals(parsedMap.get("network[0].id"), ImmutableSet.of("23"));
assertEquals(parsedMap.get("network[0].address"), ImmutableSet.of("192.168.0.1"));
}
} }