Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
testing.rs 2.58 KiB
#[cfg(test)]
pub const TEST_JSON_WEBSITE: &'static str = "
{
    \"root_page\": {
        \"template_name\": \"TEST TEMPLATE\",
        \"metadata\": {
            \"title\": \"TEST\",
            \"description\": \"TEST DESCRIPTION\",
            \"image\": [\"https://test/static/images/test.png\"],
            \"css\": [],
            \"lang\":\"en\",
            \"js\": [],
            \"url_slug\": \"\"
        },
        \"body\": [
            {
                \"tag\": \"h1\",
                \"text\": \"testing\"
            }
        ],
        \"sub_pages\": [
            {
                \"template_name\": \"TEST TEMPLATE\",
                \"metadata\": {
                    \"title\": \"TEST SUBPAGE\",
                    \"description\": \"TEST DESCRIPTION SUBPAGE\",
                    \"image\": [\"https://test/static/images/test.png\"],
                    \"css\": [],
                    \"lang\":\"en\",
                    \"js\": [],
                    \"url_slug\": \"subpage\"
                },
                \"body\": [
                    {
                        \"tag\": \"h1\",
                        \"text\": \"testing subpage\"
                    }
                ],
                \"sub_pages\": [
                    {
                        \"template_name\": \"TEST TEMPLATE\",
                        \"metadata\": {
                            \"title\": \"TEST NESTED\",
                            \"description\": \"TEST DESCRIPTION NESTED\",
                            \"image\": [\"https://test/static/images/test.png\"],
                            \"css\": [],
                            \"js\": [],
                            \"url_slug\": \"nested\",
                            \"lang\":\"en\"
                        },
                        \"body\": [
                             {
                                \"tag\": \"h1\",
                                \"text\": \"testing nested\"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    \"templates\": [
        {
            \"name\": \"TEST TEMPLATE\",
            \"layout\": {
                \"display\": \"grid\"
            },
            \"contents\": [
                {
                    \"tag\": \"nav\"
                },
                {
                    \"tag\": \"nav\",
                    \"attrs\": {
                        \"id\": \"page-body\"
                    }
                },
                {
                    \"tag\": \"footer\"
                }
            ]
        }
    ]
}
";