You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: calculate_all_postgresql_test.rb
    path of file: ./repos/calculate-all/test
    
    the code of the file until where you have to start completion: require 'test_helper'

class CalculateAllPostgresqlTest < Minitest::Test

  def db_credentials
    { adapter: 'postgres
    
  def test_returns_array_on_grouped_array_aggregate
    create_orders
    expected = {
      'card' => ['USD', 'RUB'],
      'cash' => ['USD', 'USD', 'RUB'],
    }
    assert_equal expected, Order.group(:kind).calculate_all('ARRAY_AGG(currency ORDER BY id)')
  end