Sha256: 0582420375ea1ab3d19bdeb70f7910fb45b4a30ef292c82f2d299413af7b359e

Contents?: true

Size: 876 Bytes

Versions: 3

Compression:

Stored size: 876 Bytes

Contents

var componentModule = require('./helpers/component-module');

componentModule('Components can be rendered without a DOM dependency');

QUnit.test('Simple component', function(assert) {
  var html = this.render('<h1>Hello</h1>');

  assert.ok(html.match(/<h1>Hello<\/h1>/));
});

QUnit.test('Component with dynamic value', function(assert) {
  this.set('location', 'World');

  var html = this.render('<h1>Hello {{location}}</h1>');

  assert.ok(html.match(/<h1>Hello World<\/h1>/));
});

QUnit.test('Ensure undefined attributes requiring protocol sanitization do not error', function(
  assert
) {
  this.owner.register(
    'component:fake-link',
    this.Ember.Component.extend({
      tagName: 'link',
      attributeBindings: ['href', 'rel'],
      rel: 'canonical',
    })
  );

  var html = this.render('{{fake-link}}');

  assert.ok(html.match(/rel="canonical"/));
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/node/component-rendering-test.js
discourse-ember-source-3.5.1.1 dist/node/component-rendering-test.js
discourse-ember-source-3.5.1.0 dist/dist/node/component-rendering-test.js