mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "Merge pull request #1215 from Elegios/composer_use_category_id"
This reverts commit763859d439, reversing changes made tob62caf80fb.
This commit is contained in:
@@ -17,7 +17,7 @@ describe PostCreator do
|
||||
let(:image_sizes) { {'http://an.image.host/image.jpg' => {"width" => 111, "height" => 222}} }
|
||||
|
||||
let(:creator) { PostCreator.new(user, basic_topic_params) }
|
||||
let(:creator_with_category) { PostCreator.new(user, basic_topic_params.merge(category: category.id )) }
|
||||
let(:creator_with_category) { PostCreator.new(user, basic_topic_params.merge(category: category.name )) }
|
||||
let(:creator_with_meta_data) { PostCreator.new(user, basic_topic_params.merge(meta_data: {hello: "world"} )) }
|
||||
let(:creator_with_image_sizes) { PostCreator.new(user, basic_topic_params.merge(image_sizes: image_sizes)) }
|
||||
|
||||
@@ -75,7 +75,7 @@ describe PostCreator do
|
||||
reply = nil
|
||||
|
||||
messages = MessageBus.track_publish do
|
||||
created_post = PostCreator.new(admin, basic_topic_params.merge(category: cat.id)).create
|
||||
created_post = PostCreator.new(admin, basic_topic_params.merge(category: cat.name)).create
|
||||
reply = PostCreator.new(admin, raw: "this is my test reply 123 testing", topic_id: created_post.topic_id).create
|
||||
end
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ describe CategoryFeaturedTopic do
|
||||
context 'feature_topics_for' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:category) { Fabricate(:category) }
|
||||
let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.id) }
|
||||
let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.name) }
|
||||
|
||||
it "should feature topics for a secure category" do
|
||||
|
||||
@@ -26,7 +26,7 @@ describe CategoryFeaturedTopic do
|
||||
end
|
||||
|
||||
it 'should not include invisible topics' do
|
||||
invisible_post = PostCreator.create(user, raw: "Don't look at this post because it's awful.", title: "not visible to anyone", category: category.id)
|
||||
invisible_post = PostCreator.create(user, raw: "Don't look at this post because it's awful.", title: "not visible to anyone", category: category.name)
|
||||
invisible_post.topic.update_status('visible', false, Fabricate(:admin))
|
||||
CategoryFeaturedTopic.feature_topics_for(category)
|
||||
CategoryFeaturedTopic.count.should == 1
|
||||
|
||||
Reference in New Issue
Block a user