common/corpus-common-addon/tests/integration/components/doc-created-test.js
author ymh <ymh.work@gmail.com>
Tue, 13 Dec 2016 23:30:54 +0100
changeset 473 1b8b29c0e95c
parent 445 b1e5ad6b2a29
permissions -rw-r--r--
Added tag 0.0.13 for changeset 8b1e24e0ef70
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
445
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import { moduleForComponent, test } from 'ember-qunit';
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import hbs from 'htmlbars-inline-precompile';
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
moduleForComponent('doc-created', 'Integration | Component | doc created', {
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  integration: true
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
});
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
test('it renders', function(assert) {
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
  // Set any properties with this.set('myProperty', 'value');
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
  // Handle any actions with this.on('myAction', function(val) { ... });
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  this.render(hbs`{{doc-created}}`);
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
  assert.equal(this.$().text().trim(), '');
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
  // Template block usage:
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
  this.render(hbs`
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    {{#doc-created}}
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
      template block text
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    {{/doc-created}}
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
  `);
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
  assert.equal(this.$().text().trim(), 'template block text');
b1e5ad6b2a29 Display created date instead of issued
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
});