<commit_before>describe('AdminControllerTest', function() {

  beforeEach(module('admin'));

  it('executes a dummy test', inject(function() {
    expect(0).toBe(0);
  }));
  
  var $httpBackend, ctrl;
  var item;

  beforeEach(inject(function($componentController, _$httpBackend_) {
    item = {_id:1, text:"new", star:true, done:true};
    $httpBackend = _$httpBackend_;
    $httpBackend.expectGET('/api/shoplist/starred')
                .respond([item]);
    ctrl = $componentController('admin');
  }));
  
  it('should load the default list of starred items', inject(function() {
    expect(ctrl.defaultList).toBeUndefined();
    $httpBackend.flush();
    expect(ctrl.defaultList).toBeDefined();
    expect(ctrl.defaultList.length).toBe(1);
  }));

  it('should create a new item', inject(function() {
    expect(ctrl.defaultList).toBeUndefined();
    $httpBackend.flush();
    expect(ctrl.defaultList).toBeDefined();

    $httpBackend.expectPUT(/\/api\/shoplist\/.*/).respond(200, [item]);<commit_msg>Harmless correction in admin test<commit_after>describe('AdminControllerTest', function() {

  beforeEach(module('admin'));

  it('executes a dummy test', inject(function() {
    expect(true).toBe(true);
  }));
  
  var $httpBackend, ctrl, item;

  beforeEach(inject(function($componentController, _$httpBackend_) {
    item = {_id:1, text:"new", star:true, done:true};
    $httpBackend = _$httpBackend_;
    $httpBackend.expectGET('/api/shoplist/starred')
                .respond([item]);
    ctrl = $componentController('admin');
  }));
  
  it('should load the default list of starred items', inject(function() {
    expect(ctrl.defaultList).toBeUndefined();
    $httpBackend.flush();
    expect(ctrl.defaultList).toBeDefined();
    expect(ctrl.defaultList.length).toBe(1);
  }));

  it('should create a new item', inject(function() {
    expect(ctrl.defaultList).toBeUndefined();
    $httpBackend.flush();
    expect(ctrl.defaultList).toBeDefined();

    $httpBackend.expectPUT(/\/api\/shoplist\/.*/).respond(200, [item]);
{'fraction_non_alphanumeric': 0.17404129793510326, 'fraction_numerical': 0.0058997050147492625, 'mean_word_length': 4.327225130890052, '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': '2993533', 'n_tokens_mistral': 634, 'n_tokens_neox': 635, 'n_words': 104}