2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
RSpec.shared_examples 'issuables requiring filter' do |action|
|
2018-05-09 12:01:36 +05:30
|
|
|
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
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
get action, params: { author_id: user.id }
|
2018-05-09 12:01:36 +05:30
|
|
|
end
|
|
|
|
end
|