DEV: Change bookmarkable registration to use new plugin API (#230)

Relies on core PR https://github.com/discourse/discourse/pull/20556
to be merged first.
This commit is contained in:
Martin Brennan 2023-03-08 10:39:20 +10:00 committed by GitHub
parent 0f6b30c2d8
commit a684897468
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,4 @@
3.1.0.beta1: 0f6b30c2d84d44978be1c845267609446ca9dbf2
2.9.0.beta8: 729e5a2add46fb4e2d8ed092da05a87ebbfcf05b
2.9.0.beta6: 272e9dd760f82e33f9756866434ddcbe470cdb8e
2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db

View File

@ -899,7 +899,7 @@ SQL
)
# Making DataExplorer::QueryGroup Bookmarkable.
Bookmark.register_bookmarkable(DataExplorerQueryGroupBookmarkable)
register_bookmarkable(DataExplorerQueryGroupBookmarkable)
require_dependency "application_controller"
require_dependency File.expand_path("../lib/queries.rb", __FILE__)

View File

@ -31,9 +31,11 @@ describe DataExplorerQueryGroupBookmarkable do
before do
SiteSetting.data_explorer_enabled = true
Bookmark.register_bookmarkable(DataExplorerQueryGroupBookmarkable)
register_test_bookmarkable(DataExplorerQueryGroupBookmarkable)
end
after { DiscoursePluginRegistry.reset! }
# Groups 0 and 1 have access to the Query 1.
let!(:query_group1) { Fabricate(:query_group, query: query1, group: group0) }
let!(:query_group2) { Fabricate(:query_group, query: query1, group: group1) }