ticket:3 add middleware test
ticket:3 add view tests
ticket:3 implemented requirements and fixed tests (admin doesn't path trough middleware)