refactor: move server tests to standalone module
Move tests/server.rs to tests/server/main.rs and update module paths to make the server tests more self-contained. All test imports now use crate::helpers instead of crate::server::helpers. Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
This commit is contained in:
parent
1937981db3
commit
05d856a41d
4 changed files with 7 additions and 9 deletions
|
|
@ -1,5 +0,0 @@
|
|||
mod server {
|
||||
pub mod helpers;
|
||||
pub mod roasters;
|
||||
pub mod roasts;
|
||||
}
|
||||
3
tests/server/main.rs
Normal file
3
tests/server/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
pub mod helpers;
|
||||
pub mod roasters;
|
||||
pub mod roasts;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::server::helpers::spawn_app;
|
||||
use crate::helpers::spawn_app;
|
||||
use brewlog::domain::roasters::{NewRoaster, Roaster, UpdateRoaster};
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
use crate::server::helpers::spawn_app;
|
||||
use crate::helpers::spawn_app;
|
||||
use brewlog::domain::roasters::NewRoaster;
|
||||
use brewlog::domain::roasts::{NewRoast, Roast, RoastWithRoaster};
|
||||
|
||||
async fn create_test_roaster(app: &crate::server::helpers::TestApp) -> String {
|
||||
async fn create_test_roaster(app: &crate::helpers::TestApp) -> String {
|
||||
create_test_roaster_with_name(app, "Test Roasters").await
|
||||
}
|
||||
|
||||
async fn create_test_roaster_with_name(
|
||||
app: &crate::server::helpers::TestApp,
|
||||
app: &crate::helpers::TestApp,
|
||||
name: &str,
|
||||
) -> String {
|
||||
let new_roaster = NewRoaster {
|
||||
|
|
|
|||
Loading…
Reference in a new issue