title: Problem with postgres using Rails API / Rspec / Postgresql problem
body: <p>I have problem during running test via rspec</p>
  <pre><code>bundle exec rspec spec/requests/authentication_spec.rb
  
  An error occurred while loading ./spec/requests/authentication_spec.rb.
  Failure/Error: ActiveRecord::Migration.maintain_test_schema!
  
  ActiveRecord::NoDatabaseError:
    FATAL:  Peer authentication failed for user &quot;test&quot;
  </code></pre>
  <p>My development db is working ok, I tried put data to db and succeed.
  I found many many solutions, but nothing works.
  my db config:</p>
  <pre><code>default: &amp;default
    adapter: postgresql
    encoding: unicode
    pool: &lt;%= ENV.fetch(&quot;RAILS_MAX_THREADS&quot;) { 5 } %&gt;
  
  development:
    &lt;&lt;: *default
    database: test
    adapter: postgresql
    host: localhost
    port: 5432
    user: test
    password: test
  
  test:
    &lt;&lt;: *default
    database: test
    port: 5432
    user: test
    password: test
  
  production:
    &lt;&lt;: *default
    url: &lt;%= ENV['MY_APP_DATABASE_URL'] %&gt;
  </code></pre>
  <p>What I am missing? I am new in postgresql and I want to learn rails, but I stucked on postgres (I need some basic knowledge about  postgres too)</p>
  <p>I am using ubuntu 20, ruby '2.7.0', rails 6.1.3.2, rspec-rails 5.0.1, postgres (PostgreSQL) 13.3 (Ubuntu 13.3-1.pgdg20.04+1)</p>