mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FEATURE: call hub API to update Discourse discover enrollment. (#25634)
Now forums can enroll their sites to be showcased in the Discourse [Discover](https://discourse.org/discover) directory. Once they enable the site setting `include_in_discourse_discover` to enroll their forum the `CallDiscourseHub` job will ping the `api.discourse.org/api/discover/enroll` endpoint. Then the Discourse Hub will fetch the basic details from the forum and add it to the review queue. If the site is approved then the forum details will be displayed in the `/discover` page.
This commit is contained in:
@ -67,7 +67,7 @@ RSpec.describe DiscourseUpdates do
|
||||
end
|
||||
|
||||
it "queues a version check" do
|
||||
expect_enqueued_with(job: :version_check) { version }
|
||||
expect_enqueued_with(job: :call_discourse_hub) { version }
|
||||
end
|
||||
end
|
||||
|
||||
@ -76,7 +76,7 @@ RSpec.describe DiscourseUpdates do
|
||||
context "with old version check data" do
|
||||
shared_examples "queue version check and report that version is ok" do
|
||||
it "queues a version check" do
|
||||
expect_enqueued_with(job: :version_check) { version }
|
||||
expect_enqueued_with(job: :call_discourse_hub) { version }
|
||||
end
|
||||
|
||||
it "reports 0 missing versions" do
|
||||
@ -105,7 +105,7 @@ RSpec.describe DiscourseUpdates do
|
||||
|
||||
shared_examples "when last_installed_version is old" do
|
||||
it "queues a version check" do
|
||||
expect_enqueued_with(job: :version_check) { version }
|
||||
expect_enqueued_with(job: :call_discourse_hub) { version }
|
||||
end
|
||||
|
||||
it "reports 0 missing versions" do
|
||||
|
Reference in New Issue
Block a user