about summary refs log tree commit diff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-10-25 20:28:51 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-10-25 20:28:51 +0200
commite855df149bd2f19729af48cd5f452fa3972273f8 (patch)
tree4d9dab4fd4568f67b07642db61a2f382e8b1dcc0 /spec/models/concerns
parentc647fa99cab9b9db81d36223cf2c2c27e065b648 (diff)
parent5ba46952af87e42a64962a34f7ec43bc710bdcaf (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.env.production.sample`:
  Upstream added new configuration options, uncommented by default.
  Commented them.
- `Gemfile.lock`:
  Upstream updated dependencies textually close to glitch-soc-specific
  dependencies.
  Updated those upstream dependencies.
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/account_interactions_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb
index fc653671e..656dd66cc 100644
--- a/spec/models/concerns/account_interactions_spec.rb
+++ b/spec/models/concerns/account_interactions_spec.rb
@@ -367,6 +367,23 @@ describe AccountInteractions do
     end
   end
 
+  describe '#followed_by?' do
+    subject { account.followed_by?(target_account) }
+
+    context 'followed by target_account' do
+      it 'returns true' do
+        account.passive_relationships.create(account: target_account)
+        is_expected.to be true
+      end
+    end
+
+    context 'not followed by target_account' do
+      it 'returns false' do
+        is_expected.to be false
+      end
+    end
+  end
+
   describe '#blocking?' do
     subject { account.blocking?(target_account) }