import moduleForComponent from 'web-client/tests/helpers/module-for-component';
import { test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('ads-rectangle', {
  beforeEach() {
    this.inject.service('ads');
  }
});

test('it renders and allows ad dismissal', function(assert) {
  assert.expect(1);

  this.render(hbs`{{ads-rectangle}}`);

  this.$('a.close').click();
  assert.ok(this.get('ads.dismissed'), 'clicking close dismissed the ads');
});
