import { moduleForComponent, test } from 'ember-qunit';
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('attributes', 'Integration | Component | attributes', {
  integration: true,

  beforeEach() {
    this.register('component:x-foo', Component.extend());
  }
});

test('it works!', function(assert) {

  this.render(hbs`{{x-foo (attributes data-foo="bar")}}`);

  assert.equal(this._element.querySelectorAll('[data-foo="bar"]').length, 1);
});

@@ -238,28 +238,99 @@
 ue,%0A
-%0A  beforeEach(
+%7D);%0A%0Atest('it works when component has no existing attribute bindings', function(assert
 ) %7B%0A
-  
   th
@@ -385,53 +385,345 @@
 ));%0A
+%0A
   
-%7D%0A%7D);%0A%0Atest('it works!', function(assert) %7B
+this.render(hbs%60%7B%7Bx-foo (attributes data-foo=%22bar%22)%7D%7D %7B%7Bx-foo%7D%7D%60);%0A%0A  assert.equal(this._element.querySelectorAll('%5Bdata-foo=%22bar%22%5D').length, 1);%0A%7D);%0A%0Atest('it works when component has existing attribute bindings', function(assert) %7B%0A  this.register('component:x-foo', Component.extend(%7B attributeBindings: %5B'dataDerp:data-derp'%5D %7D));
 %0A%0A  
@@ -773,16 +773,57 @@
 o=%22bar%22)
+ dataDerp=%22lol%22%7D%7D %7B%7Bx-foo dataDerp=%22hehe%22
 %7D%7D%60);%0A%0A 
@@ -883,28 +883,101 @@
 oo=%22bar%22%5D').length, 1);%0A
+  assert.equal(this._element.querySelectorAll('%5Bdata-derp%5D').length, 2);%0A
 %7D);%0A

Add basic sanity test for both scenarios.