mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: do not send welcome message to staged users
This commit is contained in:
@ -43,6 +43,17 @@ describe "Discobot welcome post" do
|
||||
expect(Jobs::NarrativeInit.jobs.first["args"].first["user_id"]).to eq(User.last.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user is staged' do
|
||||
let(:staged_user) { Fabricate(:user, staged: true) }
|
||||
|
||||
before do
|
||||
SiteSetting.discourse_narrative_bot_welcome_post_type = 'welcome_message'
|
||||
end
|
||||
|
||||
it 'should not send welcome message' do
|
||||
expect { staged_user }.to_not change { Jobs::SendDefaultWelcomeMessage.jobs.count }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user