<commit_before>'use strict';

describe('Component: mainComponent', function() {

  // load the controller's module
  beforeEach(module('lowcarbonhubApp'));
  beforeEach(module('stateMock'));

  var scope;
  var mainComponent;
  var state;
  var $httpBackend;

  // Initialize the controller and a mock scope
  beforeEach(inject(function(
    _$httpBackend_,
    $http,
    $componentController,
    $rootScope,
    $state) {
      $httpBackend = _$httpBackend_;
      /* jshint ignore:start */
      $httpBackend.expectGET('/api/installations')
        .respond([{"name":"Banbury Academy","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":0,"lng":0,"annualPredictedGeneration":23646,"capacity":27.75},{"name":"Banbury Academy extension","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0481,"lng":-1.34505,"annualPredictedGeneration":58863,"capacity":72},{"name":"Banbury Academy original array","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0474,"lng":-1.34631,"annualPredictedGeneration":37142,"capacity":49.470001220703125},{"name":"<NAME>","localAuthority":"Vale of White Horse District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7535,"lng":-1.25931,"annualPredictedGeneration":40279,"capacity":42.63999938964844},{"name":"<NAME> Primary School","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9096,"lng":-1.15826,"annualPredictedGeneration":52980,"capacity":60},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8731,"lng":-1.47654,"annualPredictedGeneration":21090,"capacity":24},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7529,"lng":-1.22217,"annualPredictedGeneration":76544,"capacity":90.5},{"name":"<NAME>","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.57,"lng":-1.30262,"annualPredictedGeneration":26169,"capacity":29.899999618530273},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8159,"lng":-1.27658,"annualPredictedGeneration":14033,"capacity":16},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"Low Carbon Hub CIC","ownershipType":"Community","energyType":"Solar PV","lat":51.7823,"lng":-1.3774,"annualPredictedGeneration":10338,"capacity":12.649999618530273},{"name":"<NAME>","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.6025,"lng":-1.13699,"annualPredictedGeneration":27765,"capacity":34.5},{"name":"Langtree School","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.5328,"lng":-1.06897,"annualPredictedGeneration":84399,"capacity":102.68000411987305},{"name":"<NAME> School","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7382,"lng":-1.23097,"annualPredictedGeneration":18119,"capacity":19.5},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9265,"lng":-1.36086,"annualPredictedGeneration":9967,"capacity":10.399999618530273},{"name":"<NAME>","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.5754,"lng":-0.992321,"annualPredictedGeneration":25181,"capacity":29.899999618530273},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0754,"lng":-1.32239,"annualPredictedGeneration":204564,"capacity":250},{"name":"Orchard Fields School","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0617,"lng":-1.36209,"annualPredictedGeneration":84625,"capacity":99.83999633789062},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"Osney Lock Hydro Limited (IPS)","ownershipType":"Community","energyType":"Hydro","lat":51.7496,"lng":-1.27266,"annualPredictedGeneration":179000,"capacity":49},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9415,"lng":-1.55849,"annualPredictedGeneration":79258,"capacity":91},{"name":"<NAME> - extension","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9414,"lng":-1.55888,"annualPredictedGeneration":18007,"capacity":19.760000228881836},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.727,"lng":-1.19781,"annualPredictedGeneration":121202,"capacity":140.39999389648438},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"Low Carbon Hub CIC","ownershipType":"Community","energyType":"Solar PV","lat":51.779,"lng":-1.37401,"annualPredictedGeneration":3253,"capacity":3.9899998903274536},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7594,"lng":-1.26658,"annualPredictedGeneration":24414,"capacity":27.5},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8521,"lng":-1.43073,"annualPredictedGeneration":33311,"capacity":34.31999969482422},{"name":"The <NAME> - North Side","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7764,"lng":-1.2575,"annualPredictedGeneration":36669,"capacity":46.439998626708984},{"name":"The <NAME> - South side","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7755,"lng":-1.25931,"annualPredictedGeneration":28538,"capacity":35},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0271,"lng":-1.367,"annualPredictedGeneration":89711,"capacity":106},{"name":"<NAME>","localAuthority":"Vale of White Horse District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.6771,"lng":-1.2673,"annualPredictedGeneration":40698,"capacity":48.619998931884766},{"name":"<NAME>lington Primary School","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8161,"lng":-1.28343,"annualPredictedGeneration":17920,"capacity":22.5},{"name":"Wheatley Park school - maths block","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7534,"lng":-1.13681,"annualPredictedGeneration":17023,"capacity":18.75},{"name":"Wheatley Park school - media block","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7534,"lng":-1.13596,"annualPredictedGeneration":24123,"capacity":30},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7575,"lng":-1.20519,"annualPredictedGeneration":21110,"capacity":26}]);

      $httpBackend.expectGET('/assets/json/topo_E07000178.json')
        .respond({'type': 'GeometryCollection', 'geometries': []});

      $httpBackend.expectGET('/api/generations')
        .respond([{"datetime":"2016-08-09T20:00:00.000Z","generated":168,"InstallationName":"Banbury Academy"},{"datetime":"2016-08-09T20:00:00.000Z","generated":644,"InstallationName":"Banbury Academy extension"},{"datetime":"2016-08-09T20:00:00.000Z","generated":89,"InstallationName":"Botley School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":350,"InstallationName":"Bure Park Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":73,"InstallationName":"Charlbury Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":371,"InstallationName":"Cheney School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":308,"InstallationName":"Chilton County Primary"},{"datetime":"2016-08-09T20:00:00.000Z","generated":57,"InstallationName":"Edward Feild School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":224,"InstallationName":"Fir Tree Junior School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":776,"InstallationName":"Langtree School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":88,"InstallationName":"Larkrise Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":32,"InstallationName":"Middle Barton Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":176,"InstallationName":"Nettlebed Community School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":1532,"InstallationName":"Norbar Torque Tools"},{"datetime":"2016-08-10T01:40:00.000Z","generated":50,"InstallationName":"Orchard Fields School"},{"datetime":"2016-07-26T23:59:40.000Z","generated":0,"InstallationName":"Osney Lock Hydro"},{"datetime":"2016-08-10T00:00:00.000Z","generated":201,"InstallationName":"<NAME>"},{"datetime":"2016-08-09T20:00:00.000Z","generated":91,"InstallationName":"<NAME> - extension"},{"datetime":"2016-08-09T20:00:00.000Z","generated":115,"InstallationName":"Stonesfield School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":149,"InstallationName":"The Cherwell School - South side"},{"datetime":"2016-08-09T20:00:00.000Z","generated":934,"InstallationName":"The Warriner School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":342,"InstallationName":"Thomas Reade School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":129,"InstallationName":"West Kidlington Primary School"},{"datetime":"2016-08-09T22:00:00.000Z","generated":1,"InstallationName":"Wheatley Park school - maths block"},{"datetime":"2016-08-09T20:00:00.000Z","generated":131,"InstallationName":"Wheatley Park school - media block"},{"datetime":"2016-08-09T20:00:00.000Z","generated":65,"InstallationName":"Windmill Primary"}]);
      /* jshint ignore:end */

      scope = $rootScope.$new();
      state = $state;
      mainComponent = $componentController('main', {
        $http: $http,
        $scope: scope
      });
  }));

  it('should attach a list of things to the controller', function() {
    mainComponent.$onInit();
    $httpBackend.flush();
    expect(mainComponent._installations.length).toBe(32);<commit_msg>disable jscs in test<commit_after>'use strict';

describe('Component: mainComponent', function() {

  // load the controller's module
  beforeEach(module('lowcarbonhubApp'));
  beforeEach(module('stateMock'));

  var scope;
  var mainComponent;
  var state;
  var $httpBackend;

  // Initialize the controller and a mock scope
  beforeEach(inject(function(
    _$httpBackend_,
    $http,
    $componentController,
    $rootScope,
    $state) {
      $httpBackend = _$httpBackend_;
      /* jshint ignore:start */
      // jscs:disable
      $httpBackend.expectGET('/api/installations')
        .respond([{"name":"Banbury Academy","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":0,"lng":0,"annualPredictedGeneration":23646,"capacity":27.75},{"name":"Banbury Academy extension","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0481,"lng":-1.34505,"annualPredictedGeneration":58863,"capacity":72},{"name":"Banbury Academy original array","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0474,"lng":-1.34631,"annualPredictedGeneration":37142,"capacity":49.470001220703125},{"name":"Botley School","localAuthority":"Vale of White Horse District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7535,"lng":-1.25931,"annualPredictedGeneration":40279,"capacity":42.63999938964844},{"name":"Bure Park Primary School","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9096,"lng":-1.15826,"annualPredictedGeneration":52980,"capacity":60},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8731,"lng":-1.47654,"annualPredictedGeneration":21090,"capacity":24},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7529,"lng":-1.22217,"annualPredictedGeneration":76544,"capacity":90.5},{"name":"<NAME> Primary","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.57,"lng":-1.30262,"annualPredictedGeneration":26169,"capacity":29.899999618530273},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8159,"lng":-1.27658,"annualPredictedGeneration":14033,"capacity":16},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"Low Carbon Hub CIC","ownershipType":"Community","energyType":"Solar PV","lat":51.7823,"lng":-1.3774,"annualPredictedGeneration":10338,"capacity":12.649999618530273},{"name":"<NAME>","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.6025,"lng":-1.13699,"annualPredictedGeneration":27765,"capacity":34.5},{"name":"Langtree School","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.5328,"lng":-1.06897,"annualPredictedGeneration":84399,"capacity":102.68000411987305},{"name":"Larkrise Primary School","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7382,"lng":-1.23097,"annualPredictedGeneration":18119,"capacity":19.5},{"name":"<NAME> Primary School","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9265,"lng":-1.36086,"annualPredictedGeneration":9967,"capacity":10.399999618530273},{"name":"Nettlebed Community School","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.5754,"lng":-0.992321,"annualPredictedGeneration":25181,"capacity":29.899999618530273},{"name":"<NAME> Tools","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0754,"lng":-1.32239,"annualPredictedGeneration":204564,"capacity":250},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0617,"lng":-1.36209,"annualPredictedGeneration":84625,"capacity":99.83999633789062},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"Osney Lock Hydro Limited (IPS)","ownershipType":"Community","energyType":"Hydro","lat":51.7496,"lng":-1.27266,"annualPredictedGeneration":179000,"capacity":49},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9415,"lng":-1.55849,"annualPredictedGeneration":79258,"capacity":91},{"name":"<NAME> - extension","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.9414,"lng":-1.55888,"annualPredictedGeneration":18007,"capacity":19.760000228881836},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.727,"lng":-1.19781,"annualPredictedGeneration":121202,"capacity":140.39999389648438},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"Low Carbon Hub CIC","ownershipType":"Community","energyType":"Solar PV","lat":51.779,"lng":-1.37401,"annualPredictedGeneration":3253,"capacity":3.9899998903274536},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7594,"lng":-1.26658,"annualPredictedGeneration":24414,"capacity":27.5},{"name":"<NAME>","localAuthority":"West Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8521,"lng":-1.43073,"annualPredictedGeneration":33311,"capacity":34.31999969482422},{"name":"<NAME> - North Side","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7764,"lng":-1.2575,"annualPredictedGeneration":36669,"capacity":46.439998626708984},{"name":"<NAME> - South side","localAuthority":"Oxford City Council","owner":"Oxford North Community Renewables Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7755,"lng":-1.25931,"annualPredictedGeneration":28538,"capacity":35},{"name":"<NAME>","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":52.0271,"lng":-1.367,"annualPredictedGeneration":89711,"capacity":106},{"name":"<NAME>","localAuthority":"Vale of White Horse District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.6771,"lng":-1.2673,"annualPredictedGeneration":40698,"capacity":48.619998931884766},{"name":"<NAME> School","localAuthority":"Cherwell District Council ","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.8161,"lng":-1.28343,"annualPredictedGeneration":17920,"capacity":22.5},{"name":"<NAME> school - maths block","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7534,"lng":-1.13681,"annualPredictedGeneration":17023,"capacity":18.75},{"name":"<NAME> - media block","localAuthority":"South Oxfordshire District Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7534,"lng":-1.13596,"annualPredictedGeneration":24123,"capacity":30},{"name":"<NAME>","localAuthority":"Oxford City Council","owner":"The Low Carbon Hub IPS Limited","ownershipType":"Community","energyType":"Solar PV","lat":51.7575,"lng":-1.20519,"annualPredictedGeneration":21110,"capacity":26}]);

      $httpBackend.expectGET('/assets/json/topo_E07000178.json')
        .respond({'type': 'GeometryCollection', 'geometries': []});

      $httpBackend.expectGET('/api/generations')
        .respond([{"datetime":"2016-08-09T20:00:00.000Z","generated":168,"InstallationName":"Banbury Academy"},{"datetime":"2016-08-09T20:00:00.000Z","generated":644,"InstallationName":"Banbury Academy extension"},{"datetime":"2016-08-09T20:00:00.000Z","generated":89,"InstallationName":"Botley School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":350,"InstallationName":"Bure Park Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":73,"InstallationName":"Charlbury Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":371,"InstallationName":"Cheney School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":308,"InstallationName":"Chilton County Primary"},{"datetime":"2016-08-09T20:00:00.000Z","generated":57,"InstallationName":"Edward Feild School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":224,"InstallationName":"Fir Tree Junior School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":776,"InstallationName":"Langtree School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":88,"InstallationName":"Larkrise Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":32,"InstallationName":"Middle Barton Primary School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":176,"InstallationName":"Nettlebed Community School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":1532,"InstallationName":"Norbar Torque Tools"},{"datetime":"2016-08-10T01:40:00.000Z","generated":50,"InstallationName":"Orchard Fields School"},{"datetime":"2016-07-26T23:59:40.000Z","generated":0,"InstallationName":"Osney Lock Hydro"},{"datetime":"2016-08-10T00:00:00.000Z","generated":201,"InstallationName":"<NAME>"},{"datetime":"2016-08-09T20:00:00.000Z","generated":91,"InstallationName":"<NAME> - extension"},{"datetime":"2016-08-09T20:00:00.000Z","generated":115,"InstallationName":"Stonesfield School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":149,"InstallationName":"The Cherwell School - South side"},{"datetime":"2016-08-09T20:00:00.000Z","generated":934,"InstallationName":"The Warriner School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":342,"InstallationName":"Thomas Reade School"},{"datetime":"2016-08-09T20:00:00.000Z","generated":129,"InstallationName":"West Kidlington Primary School"},{"datetime":"2016-08-09T22:00:00.000Z","generated":1,"InstallationName":"Wheatley Park school - maths block"},{"datetime":"2016-08-09T20:00:00.000Z","generated":131,"InstallationName":"Wheatley Park school - media block"},{"datetime":"2016-08-09T20:00:00.000Z","generated":65,"InstallationName":"Windmill Primary"}]);
      // jscs:enable
      /* jshint ignore:end */

      scope = $rootScope.$new();
      state = $state;
      mainComponent = $componentController('main', {
        $http: $http,
        $scope: scope
      });
  }));

  it('should attach a list of things to the controller', function() {
    mainComponent.$onInit();
    $httpBackend.flush();
    expect(mainComponent._installations.length).toBe(32);
{'fraction_non_alphanumeric': 0.2119019240592542, 'fraction_numerical': 0.11305976502639196, 'mean_word_length': 12.746635459332943, 'pattern_counts': {'":': 732, '<': 56, '<?xml version=': 0, '>': 56, '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': '3817887', 'n_tokens_mistral': 8754, 'n_tokens_neox': 7000, 'n_words': 857}