Skip to content

Commit

Permalink
test(database): add test for create and drop database
Browse files Browse the repository at this point in the history
  • Loading branch information
fMeow committed Oct 25, 2018
1 parent da45848 commit f2419df
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/database.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use pretty_assertions::{assert_eq, assert_ne};
use serde_json::value::Value;

use arangors::{AqlQuery, Connection, Cursor, Database};

const URL: &str = "http://localhost:8529/";

#[test]
fn setup() {
env_logger::init();
}

#[test]
fn test_create_and_drop_database() {
let conn = Connection::establish_jwt(URL, "root", "KWNngteTps7XjrNv").unwrap();
let result = conn.create_database("example").unwrap();
assert_eq!(result, true);
let result = conn.drop_database("example").unwrap();
assert_eq!(result, true);
}

0 comments on commit f2419df

Please sign in to comment.