Created
December 6, 2014 20:41
-
-
Save gdpelican/d7d9a0f49eadd8a12c60 to your computer and use it in GitHub Desktop.
Test which fails when Uncategorized category is not yet created [Discourse]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "when the category is being set to 'Uncategorized'" do | |
it "changes the category and returns the topic_id" do | |
topic.update category: category | |
tba = TopicsBulkAction.new(topic.user, [topic.id], type: 'change_category', category_id: 0) | |
topic_ids = tba.perform! | |
topic_ids.should == [topic.id] | |
topic.reload | |
topic.category.name.should == 'Uncategorized' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment