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.
This commit is contained in:
Daniel Uber 2021-05-14 07:43:39 -05:00 committed by GitHub
parent 795cf7b10a
commit af13fcb1f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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 }

View file

@ -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)