tests: get rid of useless csrf.njk template

This commit is contained in:
Alice Gaudon 2020-11-15 15:15:21 +01:00
parent ef51d128f1
commit da38fdaf72
2 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import useApp from "./_app";
import Controller from "../src/Controller";
import supertest from "supertest";
import TestApp from "../src/TestApp";
import CsrfProtectionComponent from "../src/components/CsrfProtectionComponent";
let app: TestApp;
useApp(async (addr, port) => {
@ -10,7 +11,7 @@ useApp(async (addr, port) => {
this.use(new class extends Controller {
public routes(): void {
this.get('/', (req, res) => {
res.render('test/csrf.njk');
res.send(CsrfProtectionComponent.getCsrfToken(req.getSession()));
}, 'csrf_test');
this.post('/', (req, res) => {

View File

@ -1 +0,0 @@
{{ getCsrfToken() }}