From d6ec0850b896918faf83f0eab325ec8c1f89e2bb Mon Sep 17 00:00:00 2001 From: tom barrett Date: Fri, 22 Mar 2019 11:38:32 -0500 Subject: added postgres vagrant instance and test to check connection --- tests/tests.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/tests.rs') 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"); + } } -- cgit v1.2.3