cms/app-client/tests/unit/instance-initializers/nav-menu-test.js
author ymh <ymh.work@gmail.com>
Thu, 23 Feb 2017 10:37:22 +0100
changeset 522 c6cad1055714
permissions -rw-r--r--
force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
522
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import Ember from 'ember';
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import { initialize } from 'app-client/instance-initializers/nav-menu';
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
import { module, test } from 'qunit';
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
import destroyApp from '../../helpers/destroy-app';
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
module('Unit | Instance Initializer | nav menu', {
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
  beforeEach() {
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    Ember.run(() => {
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
      this.application = Ember.Application.create();
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      this.appInstance = this.application.buildInstance();
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    });
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  },
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
  afterEach() {
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
    Ember.run(this.appInstance, 'destroy');
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    destroyApp(this.application);
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
  }
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
});
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
// Replace this with your real tests.
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
test('it works', function(assert) {
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
  initialize(this.appInstance);
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
  // you would normally confirm the results of the initializer here
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
  assert.ok(true);
c6cad1055714 force router refresh and close notice or transcript when clicking on navigation links. Fix #0025933
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
});