add a test for the view functionality