Lines Matching refs:isContentTypeAllowed
12 TEST(isContentTypeAllowed, PositiveTest) in TEST() argument
14 EXPECT_TRUE(isContentTypeAllowed("*/*", ContentType::HTML, true)); in TEST()
15 EXPECT_TRUE(isContentTypeAllowed("application/octet-stream", in TEST()
17 EXPECT_TRUE(isContentTypeAllowed("text/html", ContentType::HTML, false)); in TEST()
19 isContentTypeAllowed("application/json", ContentType::JSON, false)); in TEST()
21 isContentTypeAllowed("application/cbor", ContentType::CBOR, false)); in TEST()
22 EXPECT_TRUE(isContentTypeAllowed("application/json, text/html", in TEST()
26 TEST(isContentTypeAllowed, NegativeTest) in TEST() argument
28 EXPECT_FALSE(isContentTypeAllowed("application/octet-stream", in TEST()
31 isContentTypeAllowed("application/html", ContentType::JSON, false)); in TEST()
33 isContentTypeAllowed("application/json", ContentType::CBOR, false)); in TEST()
35 isContentTypeAllowed("application/cbor", ContentType::HTML, false)); in TEST()
36 EXPECT_FALSE(isContentTypeAllowed("application/json, text/html", in TEST()
40 TEST(isContentTypeAllowed, ContainsAnyMimeTypeReturnsTrue) in TEST() argument
43 isContentTypeAllowed("text/html, */*", ContentType::OctetStream, true)); in TEST()
46 TEST(isContentTypeAllowed, ContainsQFactorWeightingReturnsTrue) in TEST() argument
48 EXPECT_TRUE(isContentTypeAllowed("text/html, */*;q=0.8", in TEST()