blob: b539c576565280e45ed1bc682659661cba341cc7 [file] [log] [blame]
Austin Schuh9d823002019-04-14 12:53:17 -07001
2#include "internal/Embedded.h"
3#include <catch2/catch.hpp>
4
5TEST_CASE("findEmbeddedContent returns nullptr if not found", "[EmbeddedContentTests]") {
6 const auto* content = findEmbeddedContent("/not-included");
7 CHECK(content == nullptr);
8}
9
10TEST_CASE("generated content not empty", "[EmbeddedContentTests]") {
11 const auto* content = findEmbeddedContent("/_404.png");
12 CHECK(content != nullptr);
13 CHECK(content->length > 0);
14}
15
16TEST_CASE("all files generated", "[EmbeddedContentTests]") {
17 CHECK(findEmbeddedContent("/_404.png") != nullptr);
18 CHECK(findEmbeddedContent("/_error.css") != nullptr);
19 CHECK(findEmbeddedContent("/_error.html") != nullptr);
20 CHECK(findEmbeddedContent("/favicon.ico") != nullptr);
21 CHECK(findEmbeddedContent("/_jquery.min.js") != nullptr);
22 CHECK(findEmbeddedContent("/_seasocks.css") != nullptr);
23 CHECK(findEmbeddedContent("/_stats.html") != nullptr);
24}