Insert a link to the source to the attribution line when quoting a note or a message (#31427).

Patch by Mizuki ISHIKAWA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18217 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-06-02 13:29:54 +00:00
parent 748e8725d6
commit 2d475288e4
5 changed files with 27 additions and 4 deletions

View File

@@ -257,7 +257,22 @@ class MessagesControllerTest < Redmine::ControllerTest
assert_nil Message.find_by_id(2)
end
def test_quote
def test_quote_if_message_is_root
@request.session[:user_id] = 2
get :quote, :params => {
:board_id => 1,
:id => 1
},
:xhr => true
assert_response :success
assert_equal 'text/javascript', response.content_type
assert_include 'RE: First post', response.body
assert_include "Redmine Admin wrote:", response.body
assert_include '> This is the very first post\n> in the forum', response.body
end
def test_quote_if_message_is_not_root
@request.session[:user_id] = 2
get :quote, :params => {
:board_id => 1,
@@ -268,6 +283,7 @@ class MessagesControllerTest < Redmine::ControllerTest
assert_equal 'text/javascript', response.content_type
assert_include 'RE: First post', response.body
assert_include 'John Smith wrote in message#3:', response.body
assert_include '> An other reply', response.body
end