unit test for detail-view