about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-19 02:56:45 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-11-19 02:56:45 -0600
commite45cb0837bcefecfecf3ef39bbdee721a47a79fd (patch)
tree02a19dfcf74eced1516da9c65f3eb37639294f91
parentd083f7741a5996ee24bbdb7cd177e4db2ddfaead (diff)
Update .following_map examples with show-reblogs information.
-rw-r--r--spec/models/concerns/account_interactions_spec.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb
index 918508ee6..0b3a1a63e 100644
--- a/spec/models/concerns/account_interactions_spec.rb
+++ b/spec/models/concerns/account_interactions_spec.rb
@@ -12,9 +12,16 @@ describe AccountInteractions do
     subject { Account.following_map(target_account_ids, account_id) }
 
     context 'account with Follow' do
-      it 'returns { target_account_id => true }' do
-        Fabricate(:follow, account: account, target_account: target_account)
-        is_expected.to eq(target_account_id => true)
+      it 'returns { target_account_id => { reblogs: true } }' do
+        Fabricate(:follow, account: account, target_account: target_account, show_reblogs: true)
+        is_expected.to eq(target_account_id => { reblogs: true })
+      end
+    end
+
+    context 'account with Follow but with reblogs disabled' do
+      it 'returns { target_account_id => { reblogs: false } }' do
+        Fabricate(:follow, account: account, target_account: target_account, show_reblogs: false)
+        is_expected.to eq(target_account_id => { reblogs: false })
       end
     end