mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 19:36:00 +01:00
Fixed that watchers delete links are escaped on the issue view (#10932).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9700 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1126,6 +1126,36 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
assert_tag 'a', :attributes => {:href => "/projects/ecookbook/repository/revisions/3"}
|
||||
end
|
||||
|
||||
def test_show_should_display_watchers
|
||||
@request.session[:user_id] = 2
|
||||
Issue.find(1).add_watcher User.find(2)
|
||||
|
||||
get :show, :id => 1
|
||||
assert_select 'div#watchers ul' do
|
||||
assert_select 'li' do
|
||||
assert_select 'a[href=/users/2]'
|
||||
assert_select 'a img[alt=Delete]'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_show_should_display_watchers_with_gravatars
|
||||
@request.session[:user_id] = 2
|
||||
Issue.find(1).add_watcher User.find(2)
|
||||
|
||||
with_settings :gravatar_enabled => '1' do
|
||||
get :show, :id => 1
|
||||
end
|
||||
|
||||
assert_select 'div#watchers ul' do
|
||||
assert_select 'li' do
|
||||
assert_select 'img.gravatar'
|
||||
assert_select 'a[href=/users/2]'
|
||||
assert_select 'a img[alt=Delete]'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_show_with_multi_custom_field
|
||||
field = CustomField.find(1)
|
||||
field.update_attribute :multiple, true
|
||||
|
||||
Reference in New Issue
Block a user