Feature #34025 » 34025.diff
| app/views/common/feed.atom.builder (作業コピー) | ||
|---|---|---|
|
xml.instruct!
|
||
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||
|
xml.title truncate_single_line_raw(@title, 100)
|
||
|
xml.title @title
|
||
|
xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom')
|
||
|
xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false)
|
||
|
xml.id home_url
|
||
| ... | ... | |
|
xml.entry do
|
||
|
url = url_for(item.event_url(:only_path => false))
|
||
|
if @project == item.project
|
||
|
xml.title truncate_single_line_raw(item.event_title, 100)
|
||
|
xml.title item.event_title
|
||
|
else
|
||
|
xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
|
||
|
xml.title "#{item.project} - #{item.event_title}"
|
||
|
end
|
||
|
xml.link "rel" => "alternate", "href" => url
|
||
|
xml.id url
|
||
| test/functional/activities_controller_test.rb (作業コピー) | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def test_index_atom_feed_should_not_truncate_subject
|
||
|
long_subject = Array.new(255) {('a'..'z').to_a.sample}.join
|
||
|
Issue.find(5).update_attribute(:subject, long_subject)
|
||
|
get(
|
||
|
:index,
|
||
|
:params => {
|
||
|
:format => 'atom',
|
||
|
:id => 'ecookbook',
|
||
|
:with_subprojects => 1,
|
||
|
:show_issues => 1
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_select 'feed' do
|
||
|
assert_select 'title', text: "eCookbook Subproject 1 - Bug #5 (New): #{long_subject}"
|
||
|
end
|
||
|
end
|
||
|
def test_index_should_show_private_notes_with_permission_only
|
||
|
journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Private notes', :private_notes => true)
|
||
|
@request.session[:user_id] = 2
|
||