mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-16 01:36:39 +00:00
Removed unused test library that broke with latest nightly, and updated dependencies
This commit is contained in:
177
Cargo.lock
generated
177
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
10
Cargo.toml
10
Cargo.toml
@ -4,10 +4,6 @@ version = "0.1.0"
|
||||
authors = ["Daniel García <dani-garcia@users.noreply.github.com>"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Test framework, similar to rspec
|
||||
stainless = "0.1.12"
|
||||
|
||||
# Web framework for nightly with a focus on ease-of-use, expressibility, and speed.
|
||||
rocket = { version = "0.3.6", features = ["tls"] }
|
||||
rocket_codegen = "0.3.6"
|
||||
@ -17,12 +13,12 @@ rocket_contrib = "0.3.6"
|
||||
reqwest = "0.8.5"
|
||||
|
||||
# multipart/form-data support
|
||||
multipart = "0.14.1"
|
||||
multipart = "0.14.2"
|
||||
|
||||
# A generic serialization/deserialization framework
|
||||
serde = "1.0.27"
|
||||
serde_derive = "1.0.27"
|
||||
serde_json = "1.0.9"
|
||||
serde_json = "1.0.10"
|
||||
|
||||
# A safe, extensible ORM and Query builder
|
||||
# If tables need more than 16 columns, add feature "large-tables"
|
||||
@ -53,7 +49,7 @@ data-encoding = "2.1.1"
|
||||
jsonwebtoken = "4.0.0"
|
||||
|
||||
# A `dotenv` implementation for Rust
|
||||
dotenv = { version = "0.10.1", default-features = false }
|
||||
dotenv = { version = "0.11.0", default-features = false }
|
||||
|
||||
# Lazy static macro
|
||||
lazy_static = "1.0.0"
|
||||
|
39
src/tests.rs
39
src/tests.rs
@ -1,39 +0,0 @@
|
||||
use super::init_rocket;
|
||||
use rocket::local::Client;
|
||||
use rocket::http::Status;
|
||||
|
||||
// TODO: For testing, we can use either a test_transaction, or an in-memory database
|
||||
// test_transaction: http://docs.diesel.rs/diesel/connection/trait.Connection.html#method.begin_test_transaction
|
||||
// in-memory database: https://github.com/diesel-rs/diesel/issues/419 (basically use ":memory:" as the connection string
|
||||
|
||||
describe! route_tests {
|
||||
before_each {
|
||||
let rocket = init_rocket();
|
||||
let client = Client::new(rocket).expect("valid rocket instance");
|
||||
}
|
||||
|
||||
describe! alive {
|
||||
before_each {
|
||||
let mut res = client.get("/alive").dispatch();
|
||||
let body_str = res.body().and_then(|b| b.into_string()).unwrap();
|
||||
}
|
||||
|
||||
it "responds with status OK 200" {
|
||||
assert_eq!(res.status(), Status::Ok);
|
||||
}
|
||||
|
||||
it "responds with current year" {
|
||||
assert!(body_str.contains("2018"));
|
||||
}
|
||||
}
|
||||
|
||||
describe! nested_example {
|
||||
ignore "this is ignored" {
|
||||
assert_eq!(1, 2);
|
||||
}
|
||||
|
||||
failing "this fails" {
|
||||
assert_eq!(1, 2);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user