FIX: Discobot mention tutorial should be case insensitive.
This commit is contained in:
parent
e2bcf55077
commit
329969ea20
|
@ -69,7 +69,10 @@ module DiscourseNarrativeBot
|
|||
valid = false
|
||||
|
||||
doc.css(".mention").each do |mention|
|
||||
valid = true if mention.text == "@#{self.discobot_user.username}"
|
||||
if mention.text.downcase == "@#{self.discobot_user.username}".downcase
|
||||
valid = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
valid
|
||||
|
|
|
@ -803,7 +803,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
|
|||
|
||||
it 'should create the right reply' do
|
||||
post.update!(
|
||||
raw: '@discobot hello how are you doing today?'
|
||||
raw: '@disCoBot hello how are you doing today?'
|
||||
)
|
||||
|
||||
narrative.expects(:enqueue_timeout_job).with(user)
|
||||
|
|
Loading…
Reference in New Issue