New email notification option "For any event on my bookmarked projects" (#35189).

Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22438 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-11-16 08:32:41 +00:00
parent bd1fe1184b
commit 384cde0a46
7 changed files with 45 additions and 10 deletions

View File

@@ -1499,6 +1499,18 @@ class ProjectsControllerTest < Redmine::ControllerTest
refute jb.bookmark?(Project.find('ecookbook'))
end
def test_bookmark_should_update_notified_project_ids_if_mail_notification_is_bookmarked
user = User.find(2)
@request.session[:user_id] = user.id
user.update(mail_notification: 'bookmarked')
post(:bookmark, :params => {:id => 'ecookbook'})
assert_equal [true, false, false], user.members.order(:id).pluck(:mail_notification)
delete(:bookmark, :params => {:id => 'ecookbook'})
assert_equal [false, false, false], user.members.order(:id).pluck(:mail_notification)
end
def test_index_jump_without_project_id_should_redirect_to_active_tab
get(:index, :params => {:jump => 'issues'})
assert_redirected_to '/issues'