Add some view function test cases