<commit_before>'use strict';

describe('Controller: NavigationCtrl', function () {

  // load the controller's module
  beforeEach(module('sandboxFluxApp'));

  var NavigationCtrl,
    scope;

  // Initialize the controller and a mock scope
  beforeEach(inject(function ($controller, $rootScope) {
    scope = $rootScope.$new();
    NavigationCtrl = $controller('NavigationCtrl', {
      $scope: scope
      // place here mocked dependencies
    });
  }));

  it('should attach a list of awesomeThings to the scope', function () {
    expect(NavigationCtrl.awesomeThings.length).toBe(3);
  });
});<commit_msg>add navigation toggle test<commit_after>'use strict';

describe('Controller: NavigationCtrl', function () {

  // load the controller's module
  beforeEach(module('sandboxFluxApp'));

  // override _.debounce
  beforeEach(function () {
    _.debounce = function (callback) { return callback; };
  });

  var NavigationCtrl,
    isOpen,
    scope;

  // Initialize the controller and a mock scope
  beforeEach(inject(function ($controller, $rootScope) {
    scope = $rootScope.$new();
    isOpen = false;
    NavigationCtrl = $controller('NavigationCtrl', {
      $scope: scope,
      $mdSidenav: function () {
        return {
          toggle: function () { isOpen = !isOpen; }
        };
      }
    });
  }));

  it('should toggle navigation open and closed', function () {
    expect(isOpen).toBe(false);
    scope.toggleNavigation();
    expect(isOpen).toBe(true);
  });
});
{'fraction_non_alphanumeric': 0.14045698924731181, 'fraction_numerical': 0.0006720430107526882, 'mean_word_length': 3.431547619047619, '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': '1669828', 'n_tokens_mistral': 435, 'n_tokens_neox': 411, 'n_words': 104}