forked from fMeow/arangors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(database): add test for create and drop database
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |