Integration testing using angularjs