From af13fcb1f3d33df95897ecf1b589a38f5ea41783 Mon Sep 17 00:00:00 2001 From: Daniel Uber Date: Fri, 14 May 2021 07:43:39 -0500 Subject: [PATCH] Change article factory to include a flare tag "discuss" (#13760) * Change article factory to include a flare tag "discuss" This removed the css tag - keeping the articles tags count consistent. If we are checking that articles have tag css exactly there may be one or two specs changing. If we assert does not have flare then we will want to adapt that as well. * Change the tag to follow from css to html Since we removed "css" from the articles factory, use one that we kept. --- spec/factories/articles.rb | 2 +- spec/services/users/suggest_recent_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/factories/articles.rb b/spec/factories/articles.rb index fa57fa659..5a99b56e2 100644 --- a/spec/factories/articles.rb +++ b/spec/factories/articles.rb @@ -8,7 +8,7 @@ FactoryBot.define do title { generate :title } published { true } date { "01/01/2015" } - tags { "javascript, html, css" } + tags { "javascript, html, discuss" } canonical_url { Faker::Internet.url } with_canonical_url { false } with_main_image { true } diff --git a/spec/services/users/suggest_recent_spec.rb b/spec/services/users/suggest_recent_spec.rb index a74ec3384..9916776bf 100644 --- a/spec/services/users/suggest_recent_spec.rb +++ b/spec/services/users/suggest_recent_spec.rb @@ -15,7 +15,7 @@ RSpec.describe Users::SuggestRecent, type: :service do article = articles.last article.update(score: 100) allow(user).to receive(:decorate).and_return(user) - allow(user).to receive(:cached_followed_tag_names).and_return(["css"]) + allow(user).to receive(:cached_followed_tag_names).and_return(["html"]) suggested_users = suggester.suggest expect(suggested_users.size).to eq(1)