1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-03 12:50:02 +00:00

Add test for SubmitPasteResponse.

This commit is contained in:
King_DuckZ 2017-06-06 00:56:01 +01:00
parent 974424398f
commit f94cc9409b
6 changed files with 305 additions and 1 deletions

View file

@ -34,6 +34,11 @@ namespace tawashi {
const char g_post_key[] = "pastie";
const char g_language_key[] = "lang";
const char g_duration_key[] = "ttl";
#if defined(TAWASHI_WITH_TESTING)
const bool g_connect_to_redis = false;
#else
const bool g_connect_to_redis = true;
#endif
class MissingPostVarError : public TawashiException {
public:
@ -78,7 +83,7 @@ namespace tawashi {
std::ostream* parStreamOut,
const Kakoune::SafePtr<cgi::Env>& parCgiEnv
) :
Response(parSettings, parStreamOut, parCgiEnv, true)
Response(parSettings, parStreamOut, parCgiEnv, g_connect_to_redis)
{
}