Add tests for csrf middleware