about summary refs log tree commit diff
path: root/spec/models/trends/tags_spec.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-02-25 00:34:14 +0100
committerGitHub <noreply@github.com>2022-02-25 00:34:14 +0100
commit27965ce5edff20db2de1dd233c88f8393bb0da0b (patch)
tree6714a950c1b9facc8c7bd1907e81e777257e5538 /spec/models/trends/tags_spec.rb
parenta29a982eaa0536a741b43ffb3397c74e3abe7196 (diff)
Add trending statuses (#17431)
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
Diffstat (limited to 'spec/models/trends/tags_spec.rb')
-rw-r--r--spec/models/trends/tags_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/trends/tags_spec.rb b/spec/models/trends/tags_spec.rb
index 4f98c6aa4..f48c73503 100644
--- a/spec/models/trends/tags_spec.rb
+++ b/spec/models/trends/tags_spec.rb
@@ -21,7 +21,7 @@ RSpec.describe Trends::Tags do
     end
   end
 
-  describe '#get' do
+  describe '#query' do
     pending
   end
 
@@ -47,11 +47,11 @@ RSpec.describe Trends::Tags do
       end
 
       it 'calculates and re-calculates scores' do
-        expect(subject.get(false, 10)).to eq [tag1, tag3]
+        expect(subject.query.limit(10).to_a).to eq [tag1, tag3]
       end
 
       it 'omits hashtags below threshold' do
-        expect(subject.get(false, 10)).to_not include(tag2)
+        expect(subject.query.limit(10).to_a).to_not include(tag2)
       end
     end