<commit_before>'use strict';

describe('githubApp controllers', function() {

  describe('ProfileList controller', function(){
    var scope, ctrl, $httpBackend;

    beforeEach(module('githubApp'));

    beforeEach(inject(function(_$httpBackend_, $rootScope, $controller) {
      $httpBackend = _$httpBackend_;
      $httpBackend.expectGET('users.json').respond([{login:'mojombo' }, {login:'defunkt'}]);

      scope = $rootScope.$new();
      ctrl = $controller('ProfileListCtrl', {$scope:scope});
    }));

    it('should create "profiles" model with 2 profiles',
    function() {
      expect(scope.profiles).toBeUndefined();
      $httpBackend.flush();

      expect(scope.profiles).toEqual([{login:'mojombo' }, {login:'defunkt'}]);
    });
  });
});<commit_msg>Added unit test for avatar_url connected to profiles.<commit_after>'use strict';

describe('githubApp controllers', function() {

  describe('ProfileList controller', function(){
    var scope, ctrl, $httpBackend;

    beforeEach(module('githubApp'));

    beforeEach(inject(function(_$httpBackend_, $rootScope, $controller) {
      $httpBackend = _$httpBackend_;
      $httpBackend.expectGET('users.json').respond([{login:'mojombo', avatar_url:'https://avatars.githubusercontent.com/u/1?v=3'},
                                                    {login:'defunkt', avatar_url:'https://avatars.githubusercontent.com/u/2?v=3'}]);

      scope = $rootScope.$new();
      ctrl = $controller('ProfileListCtrl', {$scope:scope});
    }));

    it('should create "profiles" model with 2 profiles',
    function() {
      expect(scope.profiles).toBeUndefined();
      $httpBackend.flush();

      expect(scope.profiles).toEqual([{login:'mojombo', avatar_url:'https://avatars.githubusercontent.com/u/1?v=3'},
                                      {login:'defunkt', avatar_url:'https://avatars.githubusercontent.com/u/2?v=3'}]);
    });
  });
});
{'fraction_non_alphanumeric': 0.17718191377497372, 'fraction_numerical': 0.005257623554153523, 'mean_word_length': 3.745635910224439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5803088', 'n_tokens_mistral': 574, 'n_tokens_neox': 565, 'n_words': 85}