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

const ENTRY_SELECTOR = '.js-competition-entry';

moduleForComponent('competition-entries', {
  beforeEach() {
    this.set('channels', ['testchannel', 'otherchannel']);
  }
});

test('it shows all channels provided', function (assert) {
  assert.expect(1);
  this.render(hbs`{{competition-entries channels=channels}}`);
  assert.equal(this.$(ENTRY_SELECTOR).length, this.get('channels.length'));
});
