Testing dynamic loading from a json data source in AngularJS