title: How to test an action gets called in a component ember testing
body: <p>How can I test that an action was called in a component?</p>
  
  <p>There are multiple ways of triggering an action like clicking on a button. Now I want to test that the action that is called when clicking on that button is actually called. Something like <code>expect.functionName.to.be.called</code> or something.</p>
  
  <p>I have the following code </p>
  
  <pre><code>test('it closes the create dialog when close btn is clicked', function(assert) {
    this.render(hbs`{{group-create cancelCreateAction="cancelAction"}}`)
  
    this.$('button.btn--primary').click()
    expect('myAction').to.be.called?
  })
  </code></pre>
  
  <p>so i'm just wondering what I can do there? </p>