AngularJS test code