Skip to content

Instantly share code, notes, and snippets.

@gintsgints
Created January 26, 2014 10:03
Show Gist options
  • Save gintsgints/8630798 to your computer and use it in GitHub Desktop.
Save gintsgints/8630798 to your computer and use it in GitHub Desktop.
$scope.init = function() {
$scope.ejs = ejsResource('http://localhost:9200');
$scope.client = $scope.ejs.Request().indices('emarket').types('companies');
$scope.client.doSearch().then( function(d) {
$scope.companies = d.hits.hits;
console.log(d);
});
};
it('data should contain one company', function () {
scope.init();
//deferred.resolve(scope.client);
scope.$root.$apply();
expect(scope.companies.length).toBe(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment