mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:37:02 +08:00
Skip Discobot flag tutorial if allow_flagging_staff
is disabled.
https://meta.discourse.org/t/interacting-with-discobot/96574
This commit is contained in:
@ -401,6 +401,22 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
|
||||
expect(narrative.get_data(user)[:state].to_sym).to eq(:tutorial_flag)
|
||||
end
|
||||
|
||||
describe 'when allow_flagging_staff is false' do
|
||||
it 'should go to the right state' do
|
||||
SiteSetting.allow_flagging_staff = false
|
||||
post.update!(raw: skip_trigger)
|
||||
|
||||
DiscourseNarrativeBot::TrackSelector.new(
|
||||
:reply,
|
||||
user,
|
||||
post_id: post.id
|
||||
).select
|
||||
|
||||
expect(narrative.get_data(user)[:state].to_sym)
|
||||
.to eq(:tutorial_search)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user