use super::*; #[derive(Boilerplate)] pub(crate) struct InscriptionsHtml { pub(crate) inscriptions: Vec, pub(crate) prev: Option, pub(crate) next: Option, } #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct InscriptionsJson { pub inscriptions: Vec, pub more: bool, pub page_index: usize, } impl PageContent for InscriptionsHtml { fn title(&self) -> String { "Inscriptions".into() } } #[cfg(test)] mod tests { use super::*; #[test] fn without_prev_and_next() { assert_regex_match!( InscriptionsHtml { inscriptions: vec![inscription_id(1), inscription_id(2)], prev: None, next: None, }, "

All Inscriptions

.* prev next .* "