summaryrefslogtreecommitdiff
path: root/spec/support/issuables_requiring_filter_shared_examples.rb
blob: 71bcc82ee585ecf8ca9b8a100fdd27eda2e9e12c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
shared_examples 'issuables requiring filter' do |action|
  it "doesn't load any issuables if no filter is set" do
    expect_any_instance_of(described_class).not_to receive(:issuables_collection)

    get action

    expect(response).to render_template(action)
  end

  it "loads issuables if at least one filter is set" do
    expect_any_instance_of(described_class).to receive(:issuables_collection).and_call_original

    get action, params: { author_id: user.id }
  end
end