diff --git a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/advanced_user_narrative_spec.rb b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/advanced_user_narrative_spec.rb index f6af336c206..a3dd4e826ca 100644 --- a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/advanced_user_narrative_spec.rb +++ b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/advanced_user_narrative_spec.rb @@ -348,7 +348,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do describe 'when reply contains the skip trigger' do it 'should create the right reply' do parent_category = Fabricate(:category, name: 'a') - category = Fabricate(:category, parent_category: parent_category, name: 'b') + _category = Fabricate(:category, parent_category: parent_category, name: 'b') post.update!(raw: skip_trigger) described_class.any_instance.expects(:enqueue_timeout_job).with(user) @@ -382,7 +382,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do describe 'when user recovers a post in the right topic' do it 'should create the right reply' do parent_category = Fabricate(:category, name: 'a') - category = Fabricate(:category, parent_category: parent_category, name: 'b') + _category = Fabricate(:category, parent_category: parent_category, name: 'b') post PostDestroyer.new(user, post).destroy @@ -652,7 +652,7 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do end it 'should create the right reply' do - post.update!(raw: "[details=\"This is a test\"]wooohoo[/details]") + post.update!(raw: "[details=\"This is a test\"]\nwooohoo\n[/details]") narrative.input(:reply, user, post: post) expect(Post.offset(1).last.raw).to eq(I18n.t( diff --git a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb index 3c712876b86..b234519ed9f 100644 --- a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb +++ b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb @@ -612,7 +612,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do it 'should create the right reply' do post.update!( - raw: '[quote="#{post.user}, post:#{post.post_number}, topic:#{topic.id}"]\n:monkey: :fries:\n[/quote]' + raw: "[quote=\"#{post.user}, post:#{post.post_number}, topic:#{topic.id}\"]\n:monkey: :fries:\n[/quote]" ) narrative.expects(:enqueue_timeout_job).with(user) diff --git a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/track_selector_spec.rb b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/track_selector_spec.rb index 0aa1dde7787..b6166ccfcfe 100644 --- a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/track_selector_spec.rb +++ b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/track_selector_spec.rb @@ -562,7 +562,7 @@ describe DiscourseNarrativeBot::TrackSelector do describe 'when roll dice command is present inside a quote' do it 'should ignore the command' do user - post.update!(raw: '[quote="Donkey, post:6, topic:1"]@discobot roll 2d1[/quote]') + post.update!(raw: "[quote=\"Donkey, post:6, topic:1\"]\n@discobot roll 2d1\n[/quote]") expect { described_class.new(:reply, user, post_id: post.id).select } .to_not change { Post.count } @@ -599,7 +599,7 @@ describe DiscourseNarrativeBot::TrackSelector do describe 'when quote command is present inside a onebox or quote' do it 'should ignore the command' do user - post.update!(raw: '[quote="Donkey, post:6, topic:1"]@discobot quote[/quote]') + post.update!(raw: "[quote=\"Donkey, post:6, topic:1\"]\n@discobot quote\n[/quote]") expect { described_class.new(:reply, user, post_id: post.id).select } .to_not change { Post.count }