summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-01-03 00:16:50 +0300
committerEd Tanous <ed@tanous.net>2024-01-09 20:44:00 +0300
commit8ece0e457ee994e54c23ee7393fbce831d81a954 (patch)
treed673c8d7c744c2057a7250e4027e82249480c2fe /test
parentf3cb5df94799e94df37f9e2e6c2fcc473e0cae4a (diff)
downloadbmcweb-8ece0e457ee994e54c23ee7393fbce831d81a954.tar.xz
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$") At some point in the future, we might want to get this enabled in CI. Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'test')
-rw-r--r--test/http/utility_test.cpp4
-rw-r--r--test/include/http_utility_test.cpp22
-rw-r--r--test/redfish-core/include/redfish_aggregator_test.cpp2
3 files changed, 14 insertions, 14 deletions
diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp
index cc21bbcf2f..5f62d3f3d1 100644
--- a/test/http/utility_test.cpp
+++ b/test/http/utility_test.cpp
@@ -162,9 +162,9 @@ TEST(AppendUrlFromPieces, PiecesAreAppendedViaDelimiters)
appendUrlPieces(url, "bar");
EXPECT_EQ(std::string_view(url.data(), url.size()), "/redfish/v1/foo/bar");
- appendUrlPieces(url, "/", "bad&tring");
+ appendUrlPieces(url, "/", "bad&string");
EXPECT_EQ(std::string_view(url.data(), url.size()),
- "/redfish/v1/foo/bar/%2F/bad&tring");
+ "/redfish/v1/foo/bar/%2F/bad&string");
}
} // namespace
diff --git a/test/include/http_utility_test.cpp b/test/include/http_utility_test.cpp
index 6878001e6a..915b168b49 100644
--- a/test/include/http_utility_test.cpp
+++ b/test/include/http_utility_test.cpp
@@ -51,36 +51,36 @@ TEST(isContentTypeAllowed, ContainsQFactorWeightingReturnsTrue)
ContentType::OctetStream, true));
}
-TEST(getPreferedContentType, PositiveTest)
+TEST(getPreferredContentType, PositiveTest)
{
std::array<ContentType, 1> contentType{ContentType::HTML};
EXPECT_EQ(
- getPreferedContentType("text/html, application/json", contentType),
+ getPreferredContentType("text/html, application/json", contentType),
ContentType::HTML);
std::array<ContentType, 2> htmlJson{ContentType::HTML, ContentType::JSON};
- EXPECT_EQ(getPreferedContentType("text/html, application/json", htmlJson),
+ EXPECT_EQ(getPreferredContentType("text/html, application/json", htmlJson),
ContentType::HTML);
std::array<ContentType, 2> jsonHtml{ContentType::JSON, ContentType::HTML};
- EXPECT_EQ(getPreferedContentType("text/html, application/json", jsonHtml),
+ EXPECT_EQ(getPreferredContentType("text/html, application/json", jsonHtml),
ContentType::HTML);
std::array<ContentType, 2> cborJson{ContentType::CBOR, ContentType::JSON};
- EXPECT_EQ(
- getPreferedContentType("application/cbor, application::json", cborJson),
- ContentType::CBOR);
+ EXPECT_EQ(getPreferredContentType("application/cbor, application::json",
+ cborJson),
+ ContentType::CBOR);
- EXPECT_EQ(getPreferedContentType("application/json", cborJson),
+ EXPECT_EQ(getPreferredContentType("application/json", cborJson),
ContentType::JSON);
- EXPECT_EQ(getPreferedContentType("*/*", cborJson), ContentType::ANY);
+ EXPECT_EQ(getPreferredContentType("*/*", cborJson), ContentType::ANY);
}
-TEST(getPreferedContentType, NegativeTest)
+TEST(getPreferredContentType, NegativeTest)
{
std::array<ContentType, 1> contentType{ContentType::CBOR};
EXPECT_EQ(
- getPreferedContentType("text/html, application/json", contentType),
+ getPreferredContentType("text/html, application/json", contentType),
ContentType::NoMatch);
}
} // namespace
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 26015f7096..0739355974 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -137,7 +137,7 @@ TEST(addPrefixToItem, TopLevelCollections)
{
std::string initial("/redfish/v1/" + std::string(root));
jsonRequest["@odata.id"] = initial;
- addPrefixToItem(jsonRequest["@odata.id"], "perfix");
+ addPrefixToItem(jsonRequest["@odata.id"], "prefix");
EXPECT_EQ(jsonRequest["@odata.id"], initial);
}
}