Bug introduced in 1400f64; that commit changed dmails so that
creator_ip_addr defaulted to CurrentUser.ip_addr like this:
after_initialize :initialize_attributes, if: :new_record?
def initialize_attributes
self.from_id ||= CurrentUser.id
self.creator_ip_addr ||= CurrentUser.ip_addr
end
...but creator_ip_addr already defaulted to 127.0.0.1 from the database,
so the ||= assignment didn't work. Remove the database default so we
always default to CurrentUser.ip_addr.
The template looks like this:
Subject:
#{creator_name} mentioned you in a comment on post ##{post_id}
Body:
@#{creator_name} mentioned you in a \"comment\":/posts/#{post_id}#comment-#{id} on post ##{post_id}:
[quote]
#{DText.excerpt(body, "@"+user_name)}
[/quote]
There's not much sense in saving copies of everything DanbooruBot sends
in DanbooruBot's inbox. They probably won't be checked so it just bloats
the dmails table.
Use assert_nil if expecting nil from /home/danbooru/src/danbooru/test/unit/tag_alias_correction_test.rb:29
in `block (3 levels) in <class:TagAliasCorrectionTest>'. This will fail in MT6.
1) Error:
AliasAndImplicationImporterTest#test_: The alias and implication importer given a valid list should process it. :
NoMethodError: undefined method `role' for nil:NilClass
app/models/tag_alias.rb:124:in `rescue in process!'
app/models/tag_alias.rb:135:in `process!'
app/models/tag_alias.rb:93:in `approve!'
app/logical/alias_and_implication_importer.rb:90:in `block (2 levels) in parse'
app/logical/alias_and_implication_importer.rb:82:in `map'
app/logical/alias_and_implication_importer.rb:82:in `block in parse'
app/logical/alias_and_implication_importer.rb:81:in `parse'
app/logical/alias_and_implication_importer.rb:13:in `process!'
test/unit/alias_and_implication_importer_test.rb:24:in `block (4 levels) in <class:AliasAndImplicationImporterTest>'
test/unit/alias_and_implication_importer_test.rb:23:in `block (3 levels) in <class:AliasAndImplicationImporterTest>'
7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
Actual: 3
16) Failure:
SavedSearchTest#test_: Fetching the post ids for a search with a name should return a list of ids. [/home/danbooru/src/danbooru/test/unit/saved_search_test.rb:31]:
Expected: [1, 2, 3, 4]
Actual: []
2) Error:
CommentTest#test_: A comment created by an unlimited user should not allow duplicate votes. :
ActiveRecord::RecordInvalid: Validation failed: You have already voted for this comment
app/models/comment.rb:142:in `vote!'
test/unit/comment_test.rb:164:in `block (3 levels) in <class:CommentTest>'
3) Error:
CommentTest#test_: A comment created by an unlimited user should not allow upvotes by the creator. :
ActiveRecord::RecordInvalid: Validation failed: You cannot upvote your own comments
app/models/comment.rb:142:in `vote!'
test/unit/comment_test.rb:179:in `block (3 levels) in <class:CommentTest>'