Skip to content
代码片段 群组 项目
提交 8eb27b8c 编辑于 作者: Shinya Maeda's avatar Shinya Maeda
浏览文件

Merge branch 'fix-passing-vsa-param-in-summary' into 'master'

Fix passing date params in VSA Summary

See merge request gitlab-org/gitlab!35152
No related branches found
No related tags found
无相关合并请求
...@@ -12,6 +12,8 @@ def options(params) ...@@ -12,6 +12,8 @@ def options(params)
options[:branch] = params[:branch_name] options[:branch] = params[:branch_name]
options[:projects] = params[:project_ids] if params[:project_ids] options[:projects] = params[:project_ids] if params[:project_ids]
options[:group] = params[:group_id] if params[:group_id] options[:group] = params[:group_id] if params[:group_id]
options[:from] = params[:from] if params[:from]
options[:to] = params[:to] if params[:to]
options.merge!(params.slice(*::Gitlab::Analytics::CycleAnalytics::RequestParams::FINDER_PARAM_NAMES)) options.merge!(params.slice(*::Gitlab::Analytics::CycleAnalytics::RequestParams::FINDER_PARAM_NAMES))
end end
end end
......
---
title: Fix passing date params in VSA Summary request
merge_request: 35152
author:
type: fixed
...@@ -31,6 +31,17 @@ ...@@ -31,6 +31,17 @@
subject { get :show, params: params } subject { get :show, params: params }
it_behaves_like 'summary endpoint' it_behaves_like 'summary endpoint'
it 'passes the date filter to the query class' do
expected_date_range = {
created_after: Date.parse(params[:created_after]).at_beginning_of_day,
created_before: Date.parse(params[:created_before]).at_end_of_day
}
expect(IssuesFinder).to receive(:new).with(user, hash_including(expected_date_range)).and_call_original
subject
end
end end
describe 'GET "time_summary"' do describe 'GET "time_summary"' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册