Save article (to cache tags) before updating follow points (#15637)
Fixes a failure where the follow did not calculate implicit points correctly. The underlying issue was that the factory created `article` did not have a cached_tags value containing `tag.name` saved (`article.tags.pluck(:name)` was correct, but the cached_tags was not). This happens automatically when saving an article from the post editor, and any time we subsequently modify an article. Supersedes #15456
This commit is contained in:
parent
39b84f471d
commit
c1a3ba99eb
1 changed files with 1 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ RSpec.describe Follows::UpdatePointsWorker, type: :worker do
|
|||
|
||||
user.follow(second_tag)
|
||||
user.follow(tag)
|
||||
article.save
|
||||
end
|
||||
|
||||
it "calculates scores", :aggregate_failures do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue