mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:21:12 +08:00
FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
@ -462,4 +462,14 @@ describe Plugin::Instance do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#register_reviewable_types' do
|
||||
it 'Overrides the existing Reviewable types adding new ones' do
|
||||
current_types = Reviewable.types
|
||||
new_type_class = Class
|
||||
|
||||
Plugin::Instance.new.register_reviewable_type new_type_class
|
||||
|
||||
expect(Reviewable.types).to match_array(current_types << new_type_class.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user