summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-03-22 11:38:32 -0500
committertom barrett <spalf0@gmail.com>2019-03-22 11:38:32 -0500
commitd6ec0850b896918faf83f0eab325ec8c1f89e2bb (patch)
treeb4d2e676e68b066379e0a7096a98a4ac74e99777 /tests
parent95902608506ae8ccd1203cbbf93efbe876384a1f (diff)
added postgres vagrant instance and test to check connection
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs9
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");
+ }
}