diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-11-16 01:21:16 -0600 |
---|---|---|
committer | Surinna Curtis <ekiru.0@gmail.com> | 2017-11-16 01:21:16 -0600 |
commit | 35fbdc36f92b610e8a73e2acb220e87cf5fc83b0 (patch) | |
tree | fcd9bdb5ba49ab7a6a79590c74db858ae77b4239 /spec/models/concerns | |
parent | 30237259367a0ef2b20908518b86bbeb358999b5 (diff) | |
parent | 88627fd7aa2493a6890d60a5965459e4c7fe6fe9 (diff) |
Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/account_interactions_spec.rb | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb index a468549d8..1e238e27c 100644 --- a/spec/models/concerns/account_interactions_spec.rb +++ b/spec/models/concerns/account_interactions_spec.rb @@ -31,7 +31,44 @@ describe AccountInteractions do end it 'does mute notifications' do - expect(me.muting_notifications?(you)).to be true + expect(me.muting_notifications?(you)).to be true + 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 |