<commit_before>import { getOwner } from '@ember/application';
import ENUMS from 'irene/enums';
import { moduleForModel, test } from 'ember-qunit';
import localeConfig from 'ember-i18n/config/en';
import { run } from '@ember/runloop';

moduleForModel('project', 'Unit | Model | project', {
  needs: [
    "model:user",
    "model:file",
    'service:i18n',
    'locale:en/translations',
    'locale:en/config',
    'util:i18n/missing-message',
    'util:i18n/compile-template',
    'config:environment'
  ],
  beforeEach() {
    // set the locale and the config
    getOwner(this).lookup('service:i18n').set('locale', 'en');
    this.register('locale:en/config', localeConfig);
  }
});

test('it exists', function(assert) {
  const project = this.subject();
  var store = {
    queryRecord: function() {
      return [
        {
          id:1,
          type: "file",
          attributes: {
            name: "test"
          }
        }
      ];
    }
  };
  project.set('store', store);
  assert.deepEqual(project.get("lastFile"), [{
      id:1,
      type: "file",
      attributes: {
        name: "test"
      }
    }
  ]);
  run(function() {

    assert.equal(project.get('pdfPassword'), "Unknown!", "PDF Password/Unknown");
    project.set('uuid', "abceghi-jklm-opqr-stuv-wxyz100");
    assert.equal(project.get('pdfPassword'), "<PASSWORD>", "PDF Password");

    assert.equal(project.get('platformIconClass'), "mobile", "Platform Icon Class/mobile");
    project.set('platform', ENUMS.PLATFORM.ANDROID);
    assert.equal(project.get('platformIconClass'), "android", "Platform Icon Class/android");
    project.set('platform', ENUMS.PLATFORM.IOS);
    assert.equal(project.get('platformIconClass'), "apple", "Platform Icon Class/apple");
    project.set('platform', ENUMS.PLATFORM.WINDOWS);
    assert.equal(project.get('platformIconClass'), "windows", "Platform Icon Class/windows");


    assert.equal(project.get('isAPIScanEnabled'), false, "API Scan Enabled");
  });
});
<commit_msg>fix project test<commit_after>import { getOwner } from '@ember/application';
import ENUMS from 'irene/enums';
import { moduleForModel, test } from 'ember-qunit';
import localeConfig from 'ember-i18n/config/en';
import { run } from '@ember/runloop';

moduleForModel('project', 'Unit | Model | project', {
  needs: [
    "model:user",
    "model:file",
    'service:i18n',
    'locale:en/translations',
    'locale:en/config',
    'util:i18n/missing-message',
    'util:i18n/compile-template',
    'config:environment'
  ],
  beforeEach() {
    // set the locale and the config
    getOwner(this).lookup('service:i18n').set('locale', 'en');
    this.register('locale:en/config', localeConfig);
  }
});

test('it exists', function(assert) {
  const project = this.subject();
  var store = {
    findRecord: function() {
      return [
        {
          id:1,
          type: "file",
          attributes: {
            name: "test"
          }
        }
      ];
    }
  };
  project.set('store', store);
  assert.deepEqual(project.get("lastFile"), [{
      id:1,
      type: "file",
      attributes: {
        name: "test"
      }
    }
  ]);
  run(function() {

    assert.equal(project.get('pdfPassword'), "Unknown!", "PDF Password/Unknown");
    project.set('uuid', "abceghi-jklm-opqr-stuv-wxyz100");
    assert.equal(project.get('pdfPassword'), "<PASSWORD>", "PDF Password");

    assert.equal(project.get('platformIconClass'), "mobile", "Platform Icon Class/mobile");
    project.set('platform', ENUMS.PLATFORM.ANDROID);
    assert.equal(project.get('platformIconClass'), "android", "Platform Icon Class/android");
    project.set('platform', ENUMS.PLATFORM.IOS);
    assert.equal(project.get('platformIconClass'), "apple", "Platform Icon Class/apple");
    project.set('platform', ENUMS.PLATFORM.WINDOWS);
    assert.equal(project.get('platformIconClass'), "windows", "Platform Icon Class/windows");


    assert.equal(project.get('isAPIScanEnabled'), false, "API Scan Enabled");
  });
});

{'fraction_non_alphanumeric': 0.17635270541082165, 'fraction_numerical': 0.00751503006012024, 'mean_word_length': 3.451505016722408, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3083945', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1274, 'n_words': 228}