azure_functions/send_grid/
footer_settings.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Default, Clone, Serialize, Deserialize)]
5pub struct FooterSettings {
6 pub enable: bool,
8 pub text: String,
10 pub html: String,
12}
13
14#[cfg(test)]
15mod tests {
16 use super::*;
17 use serde_json::to_string;
18
19 #[test]
20 fn it_serializes_to_json() {
21 let json = to_string(&FooterSettings {
22 enable: true,
23 text: "hello".to_owned(),
24 html: "world".to_owned(),
25 })
26 .unwrap();
27
28 assert_eq!(json, r#"{"enable":true,"text":"hello","html":"world"}"#);
29 }
30}