Tests: move some tests from app to view and add more view tests