<commit_before>import Ember from 'ember';
import BaseModelMixin from 'irene/mixins/base-model';
import { module, test } from 'qunit';

module('Unit | Mixin | base model');

test('it works', function(assert) {
  const BaseModelObject = Ember.Object.extend(BaseModelMixin);
  const subject = BaseModelObject.create();
  assert.ok(subject);
});<commit_msg>enhance: mixin test case (COVERAGE = 60.53%)<commit_after>import Ember from 'ember';
import DS from 'ember-data';
import BaseModelMixin from 'irene/mixins/base-model';
import { moduleFor, test } from 'ember-qunit';

moduleFor('mixin:base-model', 'Unit | Mixin | base model', {
  needs: [
    'model:user'
  ],

  subject() {
    const BaseModelObject = DS.Model.extend(BaseModelMixin);
    this.register('model:base-model-object', BaseModelObject);
    return Ember.run(() => {
      let store = Ember.getOwner(this).lookup('service:store');
      return store.createRecord('base-model-object', {});
    });
  }
});

test('the mixin does what it should', function(assert) {
  const mixin = this.subject();

  Ember.run(() => {
    assert.notOk(mixin.get('createdOnHumanized'));
    assert.notOk(mixin.get('createdOnDateTime'));
    mixin.set("createdOn", new Date("25 March 2015"));
    assert.equal(mixin.get('createdOnHumanized'), "March 25, 2015", "Created On Humanized");
    assert.equal(mixin.get('createdOnDateTime'), "Wed Mar 25 2015, 00:00:00", "Created On Date Time");
  });
});
{'fraction_non_alphanumeric': 0.16724496877168632, 'fraction_numerical': 0.01943095072866065, 'mean_word_length': 4.814516129032258, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5158964', 'n_tokens_mistral': 495, 'n_tokens_neox': 464, 'n_words': 104}