Added test (#10)
Reviewed-on: #10 Co-authored-by: kdeng00 <kundeng00@pm.me> Co-committed-by: kdeng00 <kundeng00@pm.me>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
pub async fn get_db_url() -> String {
|
||||
dotenvy::dotenv().ok();
|
||||
std::env::var(crate::keys::DB_URL).expect(crate::keys::error::DB_URL)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ pub const DB_URL: &str = "DATABASE_URL";
|
||||
|
||||
// Environment key for secret main key
|
||||
// Used for the icarus app
|
||||
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
|
||||
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
|
||||
|
||||
// Environment key for secret key
|
||||
// Generic use of secret key that could be found in various apps
|
||||
|
||||
-15
@@ -1,17 +1,2 @@
|
||||
pub mod environment;
|
||||
pub mod keys;
|
||||
|
||||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user