Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Oct 22, 2024
1 parent 5b99906 commit f496a83
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
it "Ensures that the user password is stored as scram-sha-256" do
migrate

username = ActiveRecord::Base.connection_db_config.configuration_hash["username"]

puts "XXXXX USERNAME #{username}"
puts "XXXXX CONNECTION #{ActiveRecord::Base.connection_db_config.configuration_hash}"

users_and_passwords = ActiveRecord::Base.connection.execute <<-SQL
SELECT rolname, rolpassword FROM pg_authid WHERE rolcanlogin;
SQL

username = ActiveRecord::Base.connection_db_config.configuration_hash["username"]

record = users_and_passwords.to_a.detect { |i| i["rolname"] == username }

expect(record["rolname"]).to eq(username)
Expand Down

0 comments on commit f496a83

Please sign in to comment.