mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: Skip trigger match should be case insensitive.
https://meta.discourse.org/t/discobot-not-skipping-tutorial/68498
This commit is contained in:
@ -162,7 +162,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do
|
||||
|
||||
describe 'when reply contains the skip trigger' do
|
||||
it 'should create the right reply' do
|
||||
post.update!(raw: "@#{discobot_user.username} #{skip_trigger}")
|
||||
post.update!(raw: "@#{discobot_user.username} #{skip_trigger.upcase}")
|
||||
described_class.any_instance.expects(:enqueue_timeout_job).with(user)
|
||||
|
||||
DiscourseNarrativeBot::TrackSelector.new(:reply, user, post_id: post.id).select
|
||||
@ -225,7 +225,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do
|
||||
|
||||
describe 'when reply contains the skip trigger' do
|
||||
it 'should create the right reply' do
|
||||
post.update!(raw: skip_trigger)
|
||||
post.update!(raw: skip_trigger.upcase)
|
||||
described_class.any_instance.expects(:enqueue_timeout_job).with(user)
|
||||
|
||||
DiscourseNarrativeBot::TrackSelector.new(:reply, user, post_id: post.id).select
|
||||
|
@ -213,7 +213,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
|
||||
describe 'when reply contains the skip trigger' do
|
||||
it 'should create the right reply' do
|
||||
post.update!(raw: "@#{discobot_user.username} #{skip_trigger}")
|
||||
post.update!(raw: "@#{discobot_user.username} #{skip_trigger.upcase}")
|
||||
described_class.any_instance.expects(:enqueue_timeout_job).with(user)
|
||||
|
||||
DiscourseNarrativeBot::TrackSelector.new(:reply, user, post_id: post.id).select
|
||||
@ -286,7 +286,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
describe 'when user replies to the topic' do
|
||||
describe 'when reply contains the skip trigger' do
|
||||
it 'should create the right reply' do
|
||||
post.update!(raw: skip_trigger)
|
||||
post.update!(raw: skip_trigger.upcase)
|
||||
described_class.any_instance.expects(:enqueue_timeout_job).with(user)
|
||||
|
||||
DiscourseNarrativeBot::TrackSelector.new(:reply, user, post_id: post.id).select
|
||||
|
Reference in New Issue
Block a user