Add tests for detail view