|
|
|
|
@ -11,8 +11,7 @@ const nlohmann::json torrent = {
|
|
|
|
|
{"seeding", false}, |
|
|
|
|
{"state", 0}, |
|
|
|
|
{"priority", 0}, |
|
|
|
|
{"name", "Arch"} |
|
|
|
|
}; |
|
|
|
|
{"name", "Arch"}}; |
|
|
|
|
|
|
|
|
|
SCENARIO("We are running a GET /session/torrents resource") { |
|
|
|
|
auto torrent_session = TestSession(); |
|
|
|
|
@ -41,9 +40,8 @@ SCENARIO("We are running a GET /session/torrents resource") {
|
|
|
|
|
THEN("the server should reply with an array of torrents") { |
|
|
|
|
tr::session::torrents::get(torrent_session, response, request); |
|
|
|
|
CommonResponse::ok(response, {{"torrents", {torrent}}}); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |