[view] fixed up and added tests for the view resource