File tree Expand file tree Collapse file tree 6 files changed +28
-7
lines changed
Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,7 @@ component_management:
3535 name : models
3636 paths :
3737 - app/models/**
38+ - component_id : module_tasks
39+ name : tasks
40+ paths :
41+ - app/tasks/**
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def update_activity(last_activity)
6262
6363 # Gets categories appropriately scoped for a given user
6464 # @param user [User] user to check
65- # @return [ActiveRecord::Relation<category >]
65+ # @return [ActiveRecord::Relation<Category >]
6666 def self . accessible_to ( user )
6767 if user &.at_least_moderator?
6868 return Category . all
Original file line number Diff line number Diff line change 11require 'test_helper'
22
33class BlockedItemTest < ActiveSupport ::TestCase
4- # test "the truth" do
5- # assert true
6- # end
4+ test 'predicates should correctly check item type' do
5+ [ 'email' , 'ip' ] . each do |type |
6+ assert blocked_items ( type . to_sym ) . send ( "#{ type } ?" )
7+ end
8+ end
79end
Original file line number Diff line number Diff line change @@ -18,4 +18,9 @@ class CategoryTest < ActiveSupport::TestCase
1818 assert cat . name . include? ( 'Trust' )
1919 end
2020 end
21+
22+ test 'public? should correctly determine category visibility' do
23+ assert categories ( :main ) . public?
24+ assert_not categories ( :admin_only ) . public?
25+ end
2126end
Original file line number Diff line number Diff line change 11require 'test_helper'
22
33class LicenseTest < ActiveSupport ::TestCase
4- # test "the truth" do
5- # assert true
6- # end
4+ test 'site_default should correctly get the default license' do
5+ defaults = licenses . select ( &:default? )
6+ assert defaults . include? ( License . site_default )
7+ end
78end
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments