fix post test

This commit is contained in:
r888888888
2017-11-16 14:20:32 -08:00
parent 73f257ec63
commit 3ad332ad3d
3 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,10 @@
module Mentionable
extend ActiveSupport::Concern
included do
attr_accessor :skip_mention_notifications
end
module ClassMethods
# options:
# - message_field

View File

@@ -3,7 +3,6 @@ class ForumPost < ApplicationRecord
attr_accessible :body, :topic_id, :as => [:member, :builder, :gold, :platinum, :admin, :moderator, :default]
attr_accessible :is_locked, :is_sticky, :is_deleted, :as => [:admin, :moderator]
attr_accessor :skip_mention_notifications # used by `Mentionable::queue_mention_messages`
attr_readonly :topic_id
belongs_to :creator, :class_name => "User"
belongs_to :updater, :class_name => "User"

View File

@@ -21,6 +21,7 @@ class PostTest < ActiveSupport::TestCase
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
mock_saved_search_service!
mock_pool_archive_service!
ImageCropper.stubs(:enabled?).returns(false)
end