2
0
Fork 0
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:
Guo Xiang Tan 2018-08-23 14:58:07 +08:00
parent f28a53db48
commit ff0979553d
2 changed files with 18 additions and 0 deletions

View file

@ -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:'