mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Move a bunch of callbacks into PostCreator
This commit is contained in:
@@ -60,10 +60,14 @@ EXPECTED
|
||||
end
|
||||
|
||||
context 'with unsized images in the post' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:topic) { Fabricate(:topic, user: user) }
|
||||
|
||||
before do
|
||||
FastImage.stubs(:size).returns([123, 456])
|
||||
CookedPostProcessor.any_instance.expects(:image_dimensions).returns([123, 456])
|
||||
@post = Fabricate(:post_with_images)
|
||||
creator = PostCreator.new(user, raw: Fabricate.build(:post_with_images).raw, topic_id: topic.id)
|
||||
@post = creator.create
|
||||
end
|
||||
|
||||
it "adds a topic image if there's one in the post" do
|
||||
|
||||
Reference in New Issue
Block a user