Browse Source

cleanup of style

master
Jørgen Lien Sellæg 9 years ago
parent
commit
5f75dd251d
  1. 4
      toREST/tests/include/ServerContext.hpp
  2. 3
      toREST/tests/include/SessionContext.hpp
  3. 6
      toREST/tests/torrents_test.cpp

4
toREST/tests/include/ServerContext.hpp

@ -1,9 +1,9 @@
#ifndef _TR_TEST_SERVER_CONTEXT_HPP_
#define _TR_TEST_SERVER_CONTEXT_HPP_
#include <sstream>
#include <memory>
#include <Catch/fakeit.hpp>
#include <json.hpp>
#include <memory>
#include <sstream>
class TestRequest {
public:

3
toREST/tests/include/SessionContext.hpp

@ -1,9 +1,9 @@
#ifndef _TR_TEST_SESSION_CONTEXT_HPP_
#define _TR_TEST_SESSION_CONTEXT_HPP_
#include <TorrentContext.hpp>
#include <sstream>
#include <vector>
#include <TorrentContext.hpp>
class TestSessionSettings {
public:
@ -21,7 +21,6 @@ public:
int get_int(int type) const;
bool get_bool(int type);
std::string get_str(int type);
};
class TestSession {

6
toREST/tests/torrents_test.cpp

@ -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}}});
};
}
}
}
}
}
Loading…
Cancel
Save