about summary refs log tree commit diff
path: root/spec/controllers/api/v1
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-26 21:15:19 +0100
committerGitHub <noreply@github.com>2022-02-26 21:15:19 +0100
commit551820cbd9e5beebd16f16205143e2263d4f2d51 (patch)
tree6868722efeb660c0031a22aecfdc4b2c5bc9dcc6 /spec/controllers/api/v1
parente48eaf64cc7cb0cfab388331c4823ee5fb580d59 (diff)
parent67c6f37e269a4ebb538e019351f894183f3c1439 (diff)
Merge pull request #1704 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/controllers/api/v1')
-rw-r--r--spec/controllers/api/v1/trends/tags_controller_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/controllers/api/v1/trends/tags_controller_spec.rb b/spec/controllers/api/v1/trends/tags_controller_spec.rb
index e2e26dcab..d29551c56 100644
--- a/spec/controllers/api/v1/trends/tags_controller_spec.rb
+++ b/spec/controllers/api/v1/trends/tags_controller_spec.rb
@@ -7,10 +7,9 @@ RSpec.describe Api::V1::Trends::TagsController, type: :controller do
 
   describe 'GET #index' do
     before do
-      trending_tags = double()
-
-      allow(trending_tags).to receive(:get).and_return(Fabricate.times(10, :tag))
-      allow(Trends).to receive(:tags).and_return(trending_tags)
+      Fabricate.times(10, :tag).each do |tag|
+        10.times { |i| Trends.tags.add(tag, i) }
+      end
 
       get :index
     end