about summary refs log tree commit diff
path: root/spec/controllers/api/v1/trends/tags_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/api/v1/trends/tags_controller_spec.rb')
-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