mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
Added test for JSON-RPC GET request without params parameter.
This commit is contained in:
parent
bb9ad97c5c
commit
f999c2bcae
1 changed files with 8 additions and 0 deletions
|
@ -472,6 +472,14 @@ void JsonTest::testDecodeGetParams()
|
|||
CPPUNIT_ASSERT_EQUAL(std::string("[{}]"), gparam.request);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("cb"), gparam.callback);
|
||||
}
|
||||
{
|
||||
std::string query = "?method=sum&id=300";
|
||||
json::JsonGetParam gparam = json::decodeGetParams(query);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("{\"method\":\"sum\","
|
||||
"\"id\":\"300\"}"),
|
||||
gparam.request);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string(), gparam.callback);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue