34375-test.patch

Go MAEDA, 2020-12-27 13:56

Download (1.21 KB)

View differences:

test/functional/issues_controller_test.rb
138 138
    end
139 139
  end
140 140

  
141
  def test_index_with_subproject_filter_should_not_exclude_closed_subprojects_issues
142
    subproject1 = Project.find(3)
143
    subproject2 = Project.find(4)
144
    subproject1.close
145

  
146
    with_settings :display_subprojects_issues => '1' do
147
      get(
148
        :index,
149
        :params => {
150
          :project_id => 1,
151
          :set_filter => 1,
152
          :f => ['subproject_id'],
153
          :op => {'subproject_id' => '!'},
154
          :v => {'subproject_id' => [subproject2.id.to_s]},
155
          :c => ['project']
156
        }
157
      )
158
    end
159
    assert_response :success
160
    column_values = columns_values_in_list('project')
161
    assert_includes column_values, subproject1.name
162
    assert_equal 9, column_values.size
163
  end
164

  
141 165
  def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission
142 166
    @request.session[:user_id] = 2
143 167
    with_settings :display_subprojects_issues => '1' do