Skip to content

Commit

Permalink
Remove deprecated test environment condition (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
isc authored Oct 20, 2023
1 parent 76201d9 commit 96eaa6d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ class Account < ApplicationRecord

attribute :db_url
validates :db_url, format: %r{((mysql2?)|(postgres(ql)?)):\/\/.*}, allow_blank: true
# fucked up "unless" below, but otherwise the tests are fucked up
# likely because of the transactions being used in tests
# and the fact that this validation causes a new connection to be established
validate :db_url_validation unless Rails.env.test?
validate :db_url_validation

attr_encrypted :db_url, key: Rails.application.secrets.encryption_key, algorithm: 'aes-256-cbc',
v2_gcm_iv: true, mode: :per_attribute_iv_and_salt
Expand Down

0 comments on commit 96eaa6d

Please sign in to comment.