Karma full ajax implementation