Project

General

Profile

Feature #15212 » diff.patch

Mizuki ISHIKAWA, 2020-04-22 06:52

View differences:

app/views/common/feed.atom.builder
13 13
  @items.each do |item|
14 14
    xml.entry do
15 15
      url = url_for(item.event_url(:only_path => false))
16
      if @project
16
      if @project && @project == item.project
17 17
        xml.title truncate_single_line_raw(item.event_title, 100)
18 18
      else
19 19
        xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
test/functional/activities_controller_test.rb
177 177
    assert_select 'title', :text => "Redmine: #{User.find(2).name}"
178 178
  end
179 179

  
180
  def test_index_atom_feed_with_subprojects
181
    get(
182
      :index,
183
      :params => {
184
        :format => 'atom',
185
        :id => 'ecookbook',
186
        :with_subprojects => 1,
187
        :show_issues => 1
188
      }
189
    )
190
    assert_response :success
191

  
192
    assert_select 'feed' do
193
      # eCookbook
194
      assert_select 'title', text: 'Bug #1: Cannot print recipes'
195
      # eCookbook Subproject 1
196
      assert_select 'title', text: 'eCookbook Subproject 1 - Bug #5 (New): Subproject issue'
197
    end
198
  end
199

  
180 200
  def test_index_should_show_private_notes_with_permission_only
181 201
    journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Private notes', :private_notes => true)
182 202
    @request.session[:user_id] = 2
(1-1/2)