diff options
author | tom barrett <spalf0@gmail.com> | 2019-03-22 11:38:32 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-03-22 11:38:32 -0500 |
commit | d6ec0850b896918faf83f0eab325ec8c1f89e2bb (patch) | |
tree | b4d2e676e68b066379e0a7096a98a4ac74e99777 /tests | |
parent | 95902608506ae8ccd1203cbbf93efbe876384a1f (diff) |
added postgres vagrant instance and test to check connection
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index b80be21..884b812 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,4 +1,5 @@ extern crate space; +extern crate diesel; #[cfg(test)] mod tests { @@ -6,6 +7,9 @@ mod tests { use std::thread::sleep; use std::time::Duration; + use diesel::prelude::*; + use diesel::pg::PgConnection; + use space::constants; use space::item::{Item, ItemType}; use space::mass::Mass; @@ -517,4 +521,9 @@ mod tests { } } } + + #[test] + fn test_postgres_connection() { + PgConnection::establish("postgres://space:space@localhost/space_db").expect("Cannot connect"); + } } |