mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:50:26 -06:00
Fix broken specs.
This commit is contained in:
parent
bf78c228f4
commit
5169ef8814
@ -1065,7 +1065,7 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def trigger_user_created_event
|
||||
DiscourseEvent.trigger(:user_created, self)
|
||||
DiscourseEvent.trigger(:user_created, self) if self.new_record?
|
||||
true
|
||||
end
|
||||
|
||||
|
@ -4,9 +4,6 @@ require 'topic_subtype'
|
||||
|
||||
describe PostCreator do
|
||||
|
||||
before do
|
||||
end
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:topic) { Fabricate(:topic, user: user) }
|
||||
|
||||
@ -80,7 +77,6 @@ describe PostCreator do
|
||||
end
|
||||
|
||||
it "triggers extensibility events" do
|
||||
creator # bypass a user_created event, can be removed when there is a UserCreator
|
||||
DiscourseEvent.expects(:trigger).with(:before_create_post, anything).once
|
||||
DiscourseEvent.expects(:trigger).with(:validate_post, anything).once
|
||||
DiscourseEvent.expects(:trigger).with(:topic_created, anything, anything, user).once
|
||||
|
Loading…
Reference in New Issue
Block a user