We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f558f9 commit 392887aCopy full SHA for 392887a
app/models/category.rb
@@ -44,7 +44,7 @@ def update_activity(last_activity)
44
45
# Gets categories appropriately scoped for a given user
46
# @param user [User] user to check
47
- # @return [ActiveRecord::Relation<category>]
+ # @return [ActiveRecord::Relation<Category>]
48
def self.accessible_to(user)
49
if user&.at_least_moderator?
50
return Category.all
test/models/post_type_test.rb
@@ -0,0 +1,9 @@
1
+require 'test_helper'
2
+
3
+class PostTypeTest < ActiveSupport::TestCase
4
+ test 'system? should correctly determine if a type is a system type' do
5
+ assert_not post_types(:question).system?
6
+ assert post_types(:policy_doc).system?
7
+ assert post_types(:help_doc).system?
8
+ end
9
+end
0 commit comments