Add tests for view API