Use backend specific env var for deprecated_time tests
@@ -54,7 +54,8 @@ mod tests {
fn connection() -> PgConnection {
dotenv().ok();
- let connection_url = ::std::env::var("DATABASE_URL")
+ let connection_url = ::std::env::var("PG_DATABASE_URL")
+ .or_else(|_| ::std::env::var("DATABASE_URL"))
.expect("DATABASE_URL must be set in order to run tests");
PgConnection::establish(&connection_url).unwrap()
}
