mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
Skip discobot mention tutorial if mentions are disabled.
This commit is contained in:
parent
f28a53db48
commit
ff0979553d
2 changed files with 18 additions and 0 deletions
|
@ -690,6 +690,23 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'when user mentions is disabled' do
|
||||
before do
|
||||
SiteSetting.enable_mentions = false
|
||||
end
|
||||
|
||||
it 'should skip the mention tutorial step' do
|
||||
post.update!(
|
||||
raw: ':monkey: :fries:'
|
||||
)
|
||||
|
||||
narrative.expects(:enqueue_timeout_job).with(user)
|
||||
narrative.input(:reply, user, post: post)
|
||||
|
||||
expect(narrative.get_data(user)[:state].to_sym).to eq(:tutorial_formatting)
|
||||
end
|
||||
end
|
||||
|
||||
it 'should create the right reply' do
|
||||
post.update!(
|
||||
raw: ':monkey: :fries:'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue