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:
copilot-swe-agent[bot] 2025-11-24 17:32:19 +00:00 committed by Jon Seager
parent 1937981db3
commit 05d856a41d
No known key found for this signature in database
4 changed files with 7 additions and 9 deletions

View file

@ -1,5 +0,0 @@
mod server {
pub mod helpers;
pub mod roasters;
pub mod roasts;
}

3
tests/server/main.rs Normal file
View file

@ -0,0 +1,3 @@
pub mod helpers;
pub mod roasters;
pub mod roasts;

View file

@ -1,4 +1,4 @@
use crate::server::helpers::spawn_app;
use crate::helpers::spawn_app;
use brewlog::domain::roasters::{NewRoaster, Roaster, UpdateRoaster};
#[tokio::test]

View file

@ -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 {