common/corpus-common-addon/tests/integration/components/doc-literal-test.js
author ymh <ymh.work@gmail.com>
Sun, 06 Mar 2016 00:29:01 +0100
changeset 141 c0e8626a271c
permissions -rw-r--r--
literal are now objects if one of lang or datatype is not null
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
141
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import { moduleForComponent, test } from 'ember-qunit';
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import hbs from 'htmlbars-inline-precompile';
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
moduleForComponent('doc-literal', 'Integration | Component | doc generic', {
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  integration: true
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
});
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
test('it renders', function(assert) {
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
  // Set any properties with this.set('myProperty', 'value');
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
  // Handle any actions with this.on('myAction', function(val) { ... });"
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  this.render(hbs`{{doc-literal}}`);
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
  assert.equal(this.$().text().trim(), '');
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
  // Template block usage:"
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
  this.render(hbs`
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    {{#doc-literal}}
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
      template block text
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    {{/doc-literal}}
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
  `);
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
  assert.equal(this.$().text().trim(), 'template block text');
c0e8626a271c literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
});