mirror of
https://github.com/agersant/polaris
synced 2024-09-20 21:51:54 +00:00
Fixed warnings
This commit is contained in:
parent
c8655a2447
commit
69c8c93277
3 changed files with 7 additions and 4 deletions
|
@ -72,6 +72,7 @@ mod playlist;
|
|||
mod serve;
|
||||
mod server;
|
||||
mod swagger;
|
||||
#[cfg(test)]
|
||||
mod test;
|
||||
mod thumbnails;
|
||||
mod ui;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use rocket::http::Status;
|
||||
use rocket::response::NamedFile;
|
||||
use rocket::State;
|
||||
use std::io;
|
||||
|
@ -6,7 +5,6 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use crate::server::StaticDirs;
|
||||
use crate::test::get_test_environment;
|
||||
|
||||
pub fn get_routes() -> Vec<rocket::Route> {
|
||||
routes![
|
||||
|
@ -30,6 +28,9 @@ fn files(static_dirs: State<Arc<StaticDirs>>, file: PathBuf) -> Option<NamedFile
|
|||
|
||||
#[test]
|
||||
fn test_index() {
|
||||
use rocket::http::Status;
|
||||
use crate::test::get_test_environment;
|
||||
|
||||
let env = get_test_environment("swagger_index.sqlite");
|
||||
let client = &env.client;
|
||||
let response = client.get("/swagger").dispatch();
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use rocket::http::Status;
|
||||
use rocket::response::NamedFile;
|
||||
use rocket::State;
|
||||
use std::io;
|
||||
|
@ -6,7 +5,6 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use crate::server::StaticDirs;
|
||||
use crate::test::get_test_environment;
|
||||
|
||||
pub fn get_routes() -> Vec<rocket::Route> {
|
||||
routes![
|
||||
|
@ -30,6 +28,9 @@ fn files(static_dirs: State<Arc<StaticDirs>>, file: PathBuf) -> Option<NamedFile
|
|||
|
||||
#[test]
|
||||
fn test_index() {
|
||||
use rocket::http::Status;
|
||||
use crate::test::get_test_environment;
|
||||
|
||||
let env = get_test_environment("web_index.sqlite");
|
||||
let client = &env.client;
|
||||
let response = client.get("/").dispatch();
|
||||
|
|
Loading…
Reference in a new issue