Refactor search_answer to be dynamically inserted so it can be changed

This commit is contained in:
Robin Ward
2019-10-16 14:36:54 -04:00
parent 5ef49692e0
commit 74207ef03a
3 changed files with 10 additions and 6 deletions

View File

@ -946,7 +946,9 @@ describe DiscourseNarrativeBot::NewUserNarrative do
expect(narrative.get_data(user)[:state].to_sym).to eq(:tutorial_search)
expect(post.reload.topic.first_post.raw).to include(I18n.t(
"discourse_narrative_bot.new_user_narrative.search.hidden_message", base_uri: ''
"discourse_narrative_bot.new_user_narrative.search.hidden_message",
base_uri: '',
search_answer: described_class.search_answer
))
end
@ -963,7 +965,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do
it 'should create the right reply' do
post.update!(
raw: "#{described_class::SEARCH_ANSWER} this is a capybara"
raw: "#{described_class.search_answer} this is a capybara"
)
expect do