Added javascript unit test for the controller