diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-12-15 20:25:25 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-12-15 20:25:25 +0100 |
commit | f3a4d57be14b40d1e3a6ad9e1a1f9337dafc872e (patch) | |
tree | 623c4b710fed94a7280587da7d66863ab489957c /spec/presenters | |
parent | 3868ba683d56dbbeecc839fdeaeb7b3d0b18bb9a (diff) | |
parent | f847f67410c75036edb2c4b45d0db048af0481c9 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Discarded upstream changes: we have our own README - `app/controllers/follower_accounts_controller.rb`: Port upstream's minor refactoring
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/account_relationships_presenter_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/presenters/account_relationships_presenter_spec.rb b/spec/presenters/account_relationships_presenter_spec.rb index edfbbb354..8a485d2b9 100644 --- a/spec/presenters/account_relationships_presenter_spec.rb +++ b/spec/presenters/account_relationships_presenter_spec.rb @@ -10,6 +10,7 @@ RSpec.describe AccountRelationshipsPresenter do allow(Account).to receive(:blocking_map).with(account_ids, current_account_id).and_return(default_map) allow(Account).to receive(:muting_map).with(account_ids, current_account_id).and_return(default_map) allow(Account).to receive(:requested_map).with(account_ids, current_account_id).and_return(default_map) + allow(Account).to receive(:requested_by_map).with(account_ids, current_account_id).and_return(default_map) allow(Account).to receive(:domain_blocking_map).with(account_ids, current_account_id).and_return(default_map) end @@ -71,6 +72,14 @@ RSpec.describe AccountRelationshipsPresenter do end end + context 'options[:requested_by_map] is set' do + let(:options) { { requested_by_map: { 6 => true } } } + + it 'sets @requested merged with default_map and options[:requested_by_map]' do + expect(presenter.requested_by).to eq default_map.merge(options[:requested_by_map]) + end + end + context 'options[:domain_blocking_map] is set' do let(:options) { { domain_blocking_map: { 7 => true } } } |