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

moduleForComponent('f-account', 'Integration | Component | f account', {
  integration: true
});

test('it renders', function(assert) {
  // Set any properties with this.set('myProperty', 'value');
  // Handle any actions with this.on('myAction', function(val) { ... });

  this.render(hbs`{{f-account}}`);

  assert.equal(this.$().text().trim(), '');

  // Template block usage:
  this.render(hbs`
    {{#f-account}}
      template block text
    {{/f-account}}
  `);

  assert.equal(this.$().text().trim(), 'template block text');
});

@@ -198,180 +198,200 @@
 );%0A%0A
-test('it renders', function(assert) %7B%0A  // Set any properties with this.set('myProperty', 'value');%0A  // Handle any actions with this.on('myAction', function(val) %7B ...
+const accountStub = Ember.Object.create(%7B%0A  name: 'name',%0A  email: 'email',%0A  phone: 'phone'%0A%7D);%0A%0Atest('it can be submitted', function(assert) %7B%0A  this.on('submit', () =%3E %7B assert.ok(true);
  %7D)
-;
 %0A%0A  
@@ -421,86 +421,191 @@
 ount
+ submit=(action 'submit')
 %7D%7D%60);%0A
-%0A
   
-assert.equal(this.$().text().trim(), '');%0A%0A  // Template block usage:
+this.$('button').click()%0A%7D);%0A%0Atest('it bound to account model', function(assert) %7B%0A  this.set('account', accountStub);%0A  this.on('submit', () =%3E %7B%7D);%0A
 %0A  t
@@ -623,16 +623,10 @@
 hbs%60
-%0A    
 %7B%7B
-#
 f-ac
@@ -634,122 +634,196 @@
 ount
-%7D%7D%0A      template block text%0A    %7B%7B/f-account%7D%7D%0A  
+ account=account submit=(action 'submit')%7D%7D
 %60);%0A
-%0A
   
-assert.equal(this.$().text().trim(), 'template block text
+this.$('input').val('new name');%0A  this.$('input').change();%0A  this.$('button').click();%0A%0A  assert.ok(this.get('account.name') == 'new name
 ');%0A

Add test suite for f-account component