test cases for view