about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-02-04 04:25:59 +0100
committerGitHub <noreply@github.com>2019-02-04 04:25:59 +0100
commit364f2ff9aa2b4bf601d68a12bce758aeb5530467 (patch)
tree6e47b26ef9148d3b88dd9748460d8cf51beac748 /spec
parentd14c276e58f0f223b0e4889d342a948c961081b2 (diff)
Add featured hashtags to profiles (#9755)
* Add hashtag filter to profiles

GET /@:username/tagged/:hashtag
GET /api/v1/accounts/:id/statuses?tagged=:hashtag

* Display featured hashtags on public profile

* Use separate model for featured tags

* Update featured hashtag counters on-write

* Limit featured tags to 10
Diffstat (limited to 'spec')
-rw-r--r--spec/fabricators/featured_tag_fabricator.rb6
-rw-r--r--spec/models/featured_tag_spec.rb4
2 files changed, 10 insertions, 0 deletions
diff --git a/spec/fabricators/featured_tag_fabricator.rb b/spec/fabricators/featured_tag_fabricator.rb
new file mode 100644
index 000000000..25cbdaac0
--- /dev/null
+++ b/spec/fabricators/featured_tag_fabricator.rb
@@ -0,0 +1,6 @@
+Fabricator(:featured_tag) do
+  account
+  tag
+  statuses_count 1_337
+  last_status_at Time.now.utc
+end
diff --git a/spec/models/featured_tag_spec.rb b/spec/models/featured_tag_spec.rb
new file mode 100644
index 000000000..07533e0b9
--- /dev/null
+++ b/spec/models/featured_tag_spec.rb
@@ -0,0 +1,4 @@
+require 'rails_helper'
+
+RSpec.describe FeaturedTag, type: :model do
+end