<commit_before>'use strict';

describe('Service: Sessionsdata', function () {

  // load the service's module
  beforeEach(module('sumaAnalysis'));

  // instantiate service
  var Sessionsdata;
  beforeEach(inject(function (_sessionsData_) {
    Sessionsdata = _sessionsData_;
  }));

  it('should do something', function () {
    expect(!!Sessionsdata).to.equal(true);
  });

});<commit_msg>update sessionsData tests<commit_after>'use strict';

describe('Service: Sessionsdata', function () {

  // load the service's module
  beforeEach(module('sumaAnalysis'));

  // instantiate service
  var Sessionsdata,
      $rootScope,
      $httpBackend,
      params = {init: {id: 1}, count: {}, session_filter: 'false', daygroup: {}, location: {}, activity: {}};

  beforeEach(inject(function (_$rootScope_, _$httpBackend_, _sessionsData_) {
    $rootScope = _$rootScope_;
    $httpBackend = _$httpBackend_;
    Sessionsdata = _sessionsData_;
  }));

  it('should make an AJAX call', function (done) {
      $httpBackend.whenGET('lib/php/sessionsResults.php?activities=all&daygroup=all&edate=&etime=&id=1&locations=all&sdate=&session=session&session_filter=true&stime=').respond([{}, {}]);

      Sessionsdata.get(params).then(function (result) {
        expect(result.length).to.equal(2);
        done();
      });

      $httpBackend.flush();
    });

});
{'fraction_non_alphanumeric': 0.16420118343195267, 'fraction_numerical': 0.0022189349112426036, 'mean_word_length': 4.412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3945831', 'n_tokens_mistral': 435, 'n_tokens_neox': 417, 'n_words': 74}