Fixes failing test (#31972).

git-svn-id: https://svn.redmine.org/redmine/trunk@24452 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2026-02-23 17:29:01 +00:00
parent e0f094d03e
commit 8eb2ed07ce

View File

@@ -2008,15 +2008,18 @@ class IssuesControllerTest < Redmine::ControllerTest
end
def test_index_with_group_by_and_nil_group_count_should_not_render_empty_badge
Issue.generate!(:created_on => '2019-08-29 10:00:00')
@request.session[:user_id] = 1 # Admin
Issue.generate!
# Mock IssueQuery#result_count_by_group to return nil
# to simulate cases where group count is not available
IssueQuery.any_instance.stubs(:result_count_by_group).returns(nil)
get(
:index,
:params => {
:set_filter => 1,
:group_by => 'created_on'
:group_by => 'tracker'
}
)
assert_response :success