diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2017-11-15 12:01:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 12:01:17 -0500 |
commit | 04508868b07f5631eddda3e4d8240dde9b751fd4 (patch) | |
tree | dfef112d85f778bcebb24f4c3d76c28c0e422a9e /spec/models/concerns/account_interactions_spec.rb | |
parent | bfd9230d61effe537874f02de87b6415bae45ae1 (diff) | |
parent | 9a42f7cbed28ca010eca6cef89298ab806ce298f (diff) |
Merge pull request #212 from aschmitz/feat/mute-reblogs
Allow hiding reblogs on a per-follow basis
Diffstat (limited to 'spec/models/concerns/account_interactions_spec.rb')
-rw-r--r-- | spec/models/concerns/account_interactions_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb index ef957fc1d..f47d9d057 100644 --- a/spec/models/concerns/account_interactions_spec.rb +++ b/spec/models/concerns/account_interactions_spec.rb @@ -37,4 +37,41 @@ describe AccountInteractions do end end end + + describe 'ignoring reblogs from an account' do + before do + @me = Fabricate(:account, username: 'Me') + @you = Fabricate(:account, username: 'You') + end + + context 'with the reblogs option unspecified' do + before do + @me.follow!(@you) + end + + it 'defaults to showing reblogs' do + expect(@me.muting_reblogs?(@you)).to be(false) + end + end + + context 'with the reblogs option set to false' do + before do + @me.follow!(@you, reblogs: false) + end + + it 'does mute reblogs' do + expect(@me.muting_reblogs?(@you)).to be(true) + end + end + + context 'with the reblogs option set to true' do + before do + @me.follow!(@you, reblogs: true) + end + + it 'does not mute reblogs' do + expect(@me.muting_reblogs?(@you)).to be(false) + end + end + end end |