<commit_before>'use strict';

describe('Flickr Angular Controllers', function() {

  beforeEach(function(){
    this.addMatchers({
      toEqualData: function(expected) {
        return angular.equals(this.actual, expected);
      }
    });
  });

  beforeEach(module('flickr-angular'));


  describe('TabController', function(){
    var scope, $httpBackend, ctrl;
    beforeEach(inject(function(_$httpBackend_, $rootScope, $controller) {
      scope = $rootScope.$new();
      ctrl = $controller('TabController', {$scope: scope});
    }));


    it('Should have the first tab activated by default', function() {
      expect(scope.tab).toBe(1);
    });
  });
});
<commit_msg>Wrote spec for testing activation of tabs<commit_after>'use strict';

describe('Flickr Angular Controllers', function() {

  beforeEach(function(){
    this.addMatchers({
      toEqualData: function(expected) {
        return angular.equals(this.actual, expected);
      }
    });
  });

  beforeEach(module('flickr-angular'));


  describe('TabController', function(){
    var scope, $httpBackend, ctrl;
    beforeEach(inject(function(_$httpBackend_, $rootScope, $controller) {
      scope = $rootScope.$new();
      ctrl = $controller('TabController', {$scope: scope});
    }));


    it('Should have the first tab activated by default', function() {
      expect(scope.tab).toBe(1);
    });

    it('Should set the activated tab correctly',function(){
       scope.setTab(2);
        expect(scope.isSet(2)).toBe(true);
        scope.setTab(3);
        expect(scope.isSet(3)).toBe(true);
    });
  });
});

{'fraction_non_alphanumeric': 0.16414141414141414, 'fraction_numerical': 0.003787878787878788, 'mean_word_length': 3.5545977011494254, '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': '1335411', 'n_tokens_mistral': 474, 'n_tokens_neox': 459, 'n_words': 94}