|
|
|
@ -19,12 +19,12 @@ SCENARIO("We are running a GET /session/torrents resource") { |
|
|
|
} |
|
|
|
} |
|
|
|
GIVEN("the server is working properly") { |
|
|
|
GIVEN("the server is working properly") { |
|
|
|
torrent_session.valid = true; |
|
|
|
torrent_session.valid = true; |
|
|
|
AND_WHEN("the session is paused the paused field is set to true") { |
|
|
|
AND_WHEN("the session the session has no torrents") { |
|
|
|
torrent_session.paused = true; |
|
|
|
|
|
|
|
tr::session::torrents::get(torrent_session, response, request); |
|
|
|
tr::session::torrents::get(torrent_session, response, request); |
|
|
|
THEN("the server should reply with resource data") { |
|
|
|
THEN("the server should reply with an empty array") { |
|
|
|
CommonResponse::ok(response, {{"torrents", nlohmann::json::array()}}); |
|
|
|
CommonResponse::ok(response, {{"torrents", nlohmann::json::array()}}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |