about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-11-16 15:02:18 +0100
committerGitHub <noreply@github.com>2018-11-16 15:02:18 +0100
commit8069fd636ba14059524303ce76abe2173c4f3d01 (patch)
tree55dd4f8ecd39813080cb5ddedd834f93a7ffc919 /spec
parent367ad2199509e9008c04c08f3476e236b27b52a1 (diff)
Remove intermediary arrays when creating hash maps from results (#9291)
Diffstat (limited to 'spec')
-rw-r--r--spec/models/notification_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb
index c781f2a29..be5545646 100644
--- a/spec/models/notification_spec.rb
+++ b/spec/models/notification_spec.rb
@@ -101,7 +101,7 @@ RSpec.describe Notification, type: :model do
       before do
         allow(accounts_with_ids).to receive(:[]).with(stale_account1.id).and_return(account1)
         allow(accounts_with_ids).to receive(:[]).with(stale_account2.id).and_return(account2)
-        allow(Account).to receive_message_chain(:where, :map, :to_h).and_return(accounts_with_ids)
+        allow(Account).to receive_message_chain(:where, :each_with_object).and_return(accounts_with_ids)
       end
 
       let(:cached_items) do