fix tests
This commit is contained in:
@@ -7,7 +7,7 @@ module Maintenance
|
||||
def create
|
||||
@user = ::User.with_email(params[:user][:email]).first
|
||||
if @user
|
||||
LoginReminderMailer.notice(@user).deliver
|
||||
LoginReminderMailer.notice(@user).deliver_now
|
||||
flash[:notice] = "Email sent"
|
||||
else
|
||||
flash[:notice] = "Email address not found"
|
||||
|
||||
@@ -181,7 +181,7 @@ class Dmail < ActiveRecord::Base
|
||||
|
||||
def send_dmail
|
||||
if to.receive_email_notifications? && to.email.include?("@") && owner_id == to.id
|
||||
UserMailer.dmail_notice(self).deliver
|
||||
UserMailer.dmail_notice(self).deliver_now
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class ForumSubscription < ActiveRecord::Base
|
||||
CurrentUser.scoped(subscription.user, "127.0.0.1") do
|
||||
forum_posts = forum_topic.posts.where("created_at > ?", subscription.last_read_at).order("id desc")
|
||||
begin
|
||||
UserMailer.forum_notice(subscription.user, forum_topic, forum_posts).deliver
|
||||
UserMailer.forum_notice(subscription.user, forum_topic, forum_posts).deliver_now
|
||||
rescue Net::SMTPSyntaxError
|
||||
end
|
||||
subscription.update_attribute(:last_read_at, forum_topic.updated_at)
|
||||
|
||||
@@ -9,7 +9,7 @@ class Note < ActiveRecord::Base
|
||||
before_validation :blank_body
|
||||
validates_presence_of :post_id, :creator_id, :updater_id, :x, :y, :width, :height
|
||||
validate :post_must_exist
|
||||
validate :note_within_image, :message => "must be inside the image"
|
||||
validate :note_within_image
|
||||
after_save :update_post
|
||||
after_save :create_version
|
||||
validate :post_must_not_be_note_locked
|
||||
|
||||
@@ -188,7 +188,7 @@ class User < ActiveRecord::Base
|
||||
|
||||
def reset_password_and_deliver_notice
|
||||
new_password = reset_password()
|
||||
Maintenance::User::PasswordResetMailer.confirmation(self, new_password).deliver
|
||||
Maintenance::User::PasswordResetMailer.confirmation(self, new_password).deliver_now
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class UserPasswordResetNonce < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def deliver_notice
|
||||
Maintenance::User::PasswordResetMailer.reset_request(user, self).deliver
|
||||
Maintenance::User::PasswordResetMailer.reset_request(user, self).deliver_now
|
||||
end
|
||||
|
||||
def initialize_key
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1>Password Reset Request</h1>
|
||||
|
||||
<p>Someone has requested that the password for "<%= @user.name %>" for the website <%= Danbooru.config.app_name %> be reset. If you did not request this, then you can ignore this email.</p>
|
||||
<p>To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_path(:host => Danbooru.config.hostname, :only_path => false, :key => @nonce.key, :email => @nonce.email) %>.</p>
|
||||
<p>To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_url(:host => Danbooru.config.hostname, :only_path => false, :key => @nonce.key, :email => @nonce.email) %>.</p>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<%= DText.parse(@dmail.body) %>
|
||||
</div>
|
||||
|
||||
<p><%= link_to "View message", dmail_path(@dmail, :host => Danbooru.config.hostname, :only_path => false) %></p>
|
||||
<p><%= link_to "View message", dmail_url(@dmail, :host => Danbooru.config.hostname, :only_path => false) %></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user