mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Upgrade to Rails 5.2.0 (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@17410 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
157a291b66
commit
ce1c652250
2
Gemfile
2
Gemfile
@ -4,7 +4,7 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
|
||||
abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
|
||||
end
|
||||
|
||||
gem "rails", "5.1.6"
|
||||
gem "rails", "5.2.0"
|
||||
gem "coderay", "~> 1.1.1"
|
||||
gem "request_store", "1.0.5"
|
||||
gem "mime-types", "~> 3.0"
|
||||
|
||||
@ -1016,8 +1016,7 @@ class Issue < ActiveRecord::Base
|
||||
# Returns the previous assignee whenever we're before the save
|
||||
# or in after_* callbacks
|
||||
def previous_assignee
|
||||
# This is how ActiveRecord::AttributeMethods::Dirty checks if we're in a after_* callback
|
||||
if previous_assigned_to_id = mutation_tracker.equal?(mutations_from_database) ? assigned_to_id_in_database : assigned_to_id_before_last_save
|
||||
if previous_assigned_to_id = assigned_to_id_change_to_be_saved.nil? ? assigned_to_id_before_last_save : assigned_to_id_in_database
|
||||
Principal.find_by_id(previous_assigned_to_id)
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# This file is used by Rack-based servers to start the application.
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
run RedmineApp::Application
|
||||
run Rails.application
|
||||
|
||||
@ -1953,11 +1953,15 @@ class IssueTest < ActiveSupport::TestCase
|
||||
user = User.find(3)
|
||||
user.members.update_all ["mail_notification = ?", false]
|
||||
user.update! :mail_notification => 'only_assigned'
|
||||
|
||||
issue = Issue.find(2)
|
||||
|
||||
issue.assigned_to = nil
|
||||
assert_include user.mail, issue.recipients
|
||||
issue.save!
|
||||
assert_include user.mail, issue.recipients
|
||||
|
||||
issue.assigned_to = User.find(2)
|
||||
issue.save!
|
||||
assert !issue.recipients.include?(user.mail)
|
||||
end
|
||||
|
||||
|
||||
@ -1197,6 +1197,10 @@ class UserTest < ActiveSupport::TestCase
|
||||
assert assignee.notify_about?(issue)
|
||||
assert new_assignee.notify_about?(issue)
|
||||
|
||||
issue.save!
|
||||
assert assignee.notify_about?(issue)
|
||||
assert new_assignee.notify_about?(issue)
|
||||
|
||||
issue.save!
|
||||
assert !assignee.notify_about?(issue)
|
||||
assert new_assignee.notify_about?(issue)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user