summaryrefslogtreecommitdiff
path: root/spec/requests/dashboard_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/dashboard_controller_spec.rb')
-rw-r--r--spec/requests/dashboard_controller_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/requests/dashboard_controller_spec.rb b/spec/requests/dashboard_controller_spec.rb
index 9edacb27c93..1c8ab843ebe 100644
--- a/spec/requests/dashboard_controller_spec.rb
+++ b/spec/requests/dashboard_controller_spec.rb
@@ -12,4 +12,32 @@ RSpec.describe DashboardController, feature_category: :authentication_and_author
let(:url) { issues_dashboard_url(:ics, assignee_username: user.username) }
end
end
+
+ context 'issues dashboard' do
+ it_behaves_like 'rate limited endpoint', rate_limit_key: :search_rate_limit do
+ let_it_be(:current_user) { create(:user) }
+
+ before do
+ sign_in current_user
+ end
+
+ def request
+ get issues_dashboard_path, params: { scope: 'all', search: 'test' }
+ end
+ end
+ end
+
+ context 'merge requests dashboard' do
+ it_behaves_like 'rate limited endpoint', rate_limit_key: :search_rate_limit do
+ let_it_be(:current_user) { create(:user) }
+
+ before do
+ sign_in current_user
+ end
+
+ def request
+ get merge_requests_dashboard_path, params: { scope: 'all', search: 'test' }
+ end
+ end
+ end
end