<commit_before>/*global module, beforeEach, inject, describe, afterEach, it, expect */
'use strict';

beforeEach(module('em.app'));

describe('HomeController', function() {
  beforeEach(module('em.services', 'em.mockHelpers'));

  var $controller, $httpBackend, $scope, mockHttpBackendResponse, slide, userItems;

  beforeEach(inject(function(_$controller_, _$httpBackend_, _$rootScope_, _mockHttpBackendResponse_) {
    $httpBackend = _$httpBackend_;
    mockHttpBackendResponse = _mockHttpBackendResponse_;
    userItems = mockHttpBackendResponse.getItemsResponse();

    $scope = _$rootScope_.$new();
    $controller = _$controller_('HomeController', {
      $scope : $scope,
      slide : slide
    });
  }));

  afterEach(function() {
    $httpBackend.verifyNoOutstandingExpectation();
    $httpBackend.verifyNoOutstandingRequest();
    mockHttpBackendResponse.clearSessionStorage();
  });

  it('should return logged user\'s items', inject(function() {
    expect($scope.items).toEqual([]);
    $scope.items = userItems.items;
    expect($scope.items.length).toBe(2);
  }));

  it('should return logged user\'s notes', inject(function() {
    $scope.notes = userItems.notes;
    expect($scope.notes.length).toBe(3);
  }));

  it('should return logged user\'s tasks', inject(function() {
    $scope.tasks = userItems.tasks;
    expect($scope.tasks.length).toBe(8);
  }));

  it('should add new item', inject(function(_HttpBasicAuthenticationService_, _itemsArray_, _SessionStorageService_) {
    var HttpBasicAuthenticationService, itemsArray, SessionStorageService;

    HttpBasicAuthenticationService = _HttpBasicAuthenticationService_;

    itemsArray = _itemsArray_;
    SessionStorageService = _SessionStorageService_;

    $scope.newItem = {
      title : 'Buy more milk'
    };
  }));
});<commit_msg>HomeController does not return items or tasks or notes anymore, MainController does<commit_after>/*global module, beforeEach, inject, describe, afterEach, it, expect */
'use strict';

beforeEach(module('em.app'));

describe('HomeController', function() {
  beforeEach(module('em.services', 'em.mockHelpers'));

  var $controller, $httpBackend, $scope, mockHttpBackendResponse, slide, userItems;

  beforeEach(inject(function(_$controller_, _$httpBackend_, _$rootScope_, _mockHttpBackendResponse_) {
    $httpBackend = _$httpBackend_;
    mockHttpBackendResponse = _mockHttpBackendResponse_;
    userItems = mockHttpBackendResponse.getItemsResponse();

    $scope = _$rootScope_.$new();
    $controller = _$controller_('HomeController', {
      $scope : $scope,
      slide : slide
    });
  }));

  afterEach(function() {
    $httpBackend.verifyNoOutstandingExpectation();
    $httpBackend.verifyNoOutstandingRequest();
    mockHttpBackendResponse.clearSessionStorage();
  });

  it('should add new item', inject(function(_HttpBasicAuthenticationService_, _itemsArray_, _SessionStorageService_) {
    var HttpBasicAuthenticationService, itemsArray, SessionStorageService;

    HttpBasicAuthenticationService = _HttpBasicAuthenticationService_;

    itemsArray = _itemsArray_;
    SessionStorageService = _SessionStorageService_;

    $scope.newItem = {
      title : 'Buy more milk'
    };
  }));
});
{'fraction_non_alphanumeric': 0.1279576587795766, 'fraction_numerical': 0.0009339975093399751, 'mean_word_length': 5.155172413793103, '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': '4938487', 'n_tokens_mistral': 895, 'n_tokens_neox': 905, 'n_words': 171}