summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-11-13 17:35:27 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-11-13 17:35:27 +0000
commit7b4aedb80461861be62b3fcd15a83be5927c6692 (patch)
treeece9e17140815bc2046bde20190dc9d2ac25e795 /test
parent504ef7d75a5a4c8b47e7a5eaef78f45d0de0cf87 (diff)
downloadredmine-7b4aedb80461861be62b3fcd15a83be5927c6692.tar.gz
redmine-7b4aedb80461861be62b3fcd15a83be5927c6692.zip
Merged r22427 and r22428 to 5.1-stable (#39521).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22433 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/system/inline_autocomplete_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb
index ea7723163..db63c953b 100644
--- a/test/system/inline_autocomplete_test.rb
+++ b/test/system/inline_autocomplete_test.rb
@@ -218,4 +218,23 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
assert_equal '@dlopper ', find('#notes').value
end
+
+ def test_inline_autocomplete_for_users_on_issues_without_edit_issue_permission
+ role_developer = Role.find(2)
+ role_developer.remove_permission!(:edit_issues)
+ role_developer.add_permission!(:add_issue_watchers)
+
+ log_user('jsmith', 'jsmith')
+ visit '/issues/4/edit'
+
+ find('#issue_notes').click
+ fill_in 'issue[notes]', :with => '@'
+
+ within('.tribute-container') do
+ assert page.has_text? 'John Smith'
+ first('li').click
+ end
+
+ assert_equal '@jsmith ', find('#issue_notes').value
+ end
end