DEV: Convert some files to autoloading and various improvements (#26860)

This commit is contained in:
Osama Sayegh
2024-05-06 23:12:55 +03:00
committed by GitHub
parent 8bbcd409e3
commit 2f2355b0ad
63 changed files with 90 additions and 186 deletions

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require_relative "../discourse_automation_helper"
describe "SendPms" do
fab!(:automation) do
Fabricate(:automation, script: DiscourseAutomation::Scripts::SEND_PMS, trigger: "stalled_wiki")
@ -42,7 +40,7 @@ describe "SendPms" do
it "creates expected PM" do
expect {
Jobs::StalledWikiTracker.new.execute(nil)
Jobs::DiscourseAutomation::StalledWikiTracker.new.execute(nil)
post = Post.last
expect(post.topic.title).to eq("A message from #{Discourse.system_user.username}")