DEV: Fix flaky specs (#13226)

Some specs failed when `LOAD_PLUGINS=1` was set while migrating the test DB and the narrative-bot plugin disabled the `send_welcome_message` site setting.
This commit is contained in:
Gerhard Schlager
2021-06-01 14:38:55 +02:00
committed by GitHub
parent fb4dc2f35c
commit 3df928d609
3 changed files with 13 additions and 6 deletions

View File

@ -153,6 +153,8 @@ describe User do
let(:user) { Fabricate(:user) }
it 'enqueues the system message' do
SiteSetting.send_welcome_message = true
expect_enqueued_with(job: :send_system_message, args: { user_id: user.id, message_type: 'welcome_user' }) do
user.enqueue_welcome_message('welcome_user')
end