diff options
author | Etienne Massip <etienne.massip@gmail.com> | 2012-01-14 16:08:51 +0000 |
---|---|---|
committer | Etienne Massip <etienne.massip@gmail.com> | 2012-01-14 16:08:51 +0000 |
commit | 54c0b531e127dc960e32d18a190fd8d87564ad34 (patch) | |
tree | 52c43e7f0bc9c28b2073d3f8fbe9d9deb342a4f9 /test/functional/activities_controller_test.rb | |
parent | 002081f2245eb2f75848c0fed0cacf93902d0cf7 (diff) | |
download | redmine-54c0b531e127dc960e32d18a190fd8d87564ad34.tar.gz redmine-54c0b531e127dc960e32d18a190fd8d87564ad34.zip |
Fixed double escaping of Atom feed links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8646 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/activities_controller_test.rb')
-rw-r--r-- | test/functional/activities_controller_test.rb | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index f9d061325..5275034d0 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -97,9 +97,39 @@ class ActivitiesControllerTest < ActionController::TestCase end def test_index_atom_feed - get :index, :format => 'atom' + get :index, :format => 'atom', :with_subprojects => 0 assert_response :success assert_template 'common/feed.atom' + + assert_tag :tag => 'link', :parent => {:tag => 'feed', :parent => nil }, + :attributes => {:rel => 'self', :href => 'http://test.host/activity.atom?with_subprojects=0'} + assert_tag :tag => 'link', :parent => {:tag => 'feed', :parent => nil }, + :attributes => {:rel => 'alternate', :href => 'http://test.host/activity?with_subprojects=0'} + + assert_tag :tag => 'entry', :child => { + :tag => 'link', + :attributes => {:href => 'http://test.host/issues/11'}} + end + + def test_index_atom_feed_with_explicit_selection + get :index, :format => 'atom', :with_subprojects => 0, + :show_changesets => 1, + :show_documents => 1, + :show_files => 1, + :show_issues => 1, + :show_messages => 1, + :show_news => 1, + :show_time_entries => 1, + :show_wiki_edits => 1 + + assert_response :success + assert_template 'common/feed.atom' + + assert_tag :tag => 'link', :parent => {:tag => 'feed', :parent => nil }, + :attributes => {:rel => 'self', :href => 'http://test.host/activity.atom?show_changesets=1&show_documents=1&show_files=1&show_issues=1&show_messages=1&show_news=1&show_time_entries=1&show_wiki_edits=1&with_subprojects=0'} + assert_tag :tag => 'link', :parent => {:tag => 'feed', :parent => nil }, + :attributes => {:rel => 'alternate', :href => 'http://test.host/activity?show_changesets=1&show_documents=1&show_files=1&show_issues=1&show_messages=1&show_news=1&show_time_entries=1&show_wiki_edits=1&with_subprojects=0'} + assert_tag :tag => 'entry', :child => { :tag => 'link', :attributes => {:href => 'http://test.host/issues/11'}} |