fixing some more tests
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Chris Cochrun 2026-01-15 13:29:17 -06:00
parent 39f797f8de
commit 329ea39431
2 changed files with 15 additions and 8 deletions

View file

@ -19,7 +19,7 @@ use super::songs::Song;
)]
pub struct Slide {
id: i32,
background: Background,
pub(crate) background: Background,
text: String,
font: String,
font_size: i32,
@ -708,7 +708,7 @@ mod test {
background: Background::try_from("~/pics/frodo.jpg")
.unwrap(),
font: "Quicksand".to_string(),
font_size: 70,
font_size: 140,
..Default::default()
}
}

View file

@ -39,12 +39,13 @@ pub fn parse_lisp(value: Value) -> Vec<ServiceItem> {
mod test {
use std::{fs::read_to_string, path::PathBuf};
use crate::{
Background, TextAlignment,
core::{
images::Image, kinds::ServiceItemKind,
service_items::ServiceTrait, songs::Song, videos::Video,
},
use crate::core::{
images::Image,
kinds::ServiceItemKind,
service_items::ServiceTrait,
slide::{Background, Slide, SlideBuilder, TextAlignment},
songs::Song,
videos::Video,
};
use super::*;
@ -115,11 +116,16 @@ mod test {
ServiceItem {
title: "This is frodo".to_string(),
kind: ServiceItemKind::Content(slide.clone()),
slides: vec![slide],
..Default::default()
}
}
fn service_item_2() -> ServiceItem {
let video = Video::from(PathBuf::from(
"~/vids/test/camprules2024.mp4",
));
let slide = &video.to_slides().unwrap()[0];
ServiceItem {
title: "camprules2024.mp4".to_string(),
kind: ServiceItemKind::Video(Video {
@ -130,6 +136,7 @@ mod test {
looping: false,
..Default::default()
}),
slides: vec![slide.clone()],
..Default::default()
}
}