blob: 39a12cd54650adee848b57c74edd7364e98cbd01 [file] [log] [blame]
Ed Tanousf9273472017-02-28 16:05:13 -08001#include "token_authorization_middleware.hpp"
2#include <crow/app.h>
3#include "gtest/gtest.h"
4
5
6// Tests that Base64 basic strings work
7TEST(Authentication, TestBasicReject)
8{
Ed Tanous904063f2017-03-02 16:48:24 -08009 /*
Ed Tanousf9273472017-02-28 16:05:13 -080010 crow::App<crow::TokenAuthorizationMiddleware> app;
11 crow::request req;
12 crow::response res;
13 app.handle(req, res);
14 ASSERT_EQ(res.code, 400);
15
16
17 crow::App<crow::TokenAuthorizationMiddleware> app;
18 decltype(app)::server_t server(&app, "127.0.0.1", 45451);
19 CROW_ROUTE(app, "/")([&](const crow::request& req)
20 {
21 app.get_context<NullMiddleware>(req);
22 app.get_context<NullSimpleMiddleware>(req);
23 return "";
24 });
Ed Tanous904063f2017-03-02 16:48:24 -080025 */
Ed Tanousf9273472017-02-28 16:05:13 -080026}
27
28