xref: /openbmc/bmcweb/test/redfish-core/include/redfish_test.cpp (revision 9838eb20341568971b9543c2187372d20daf64aa)
1 #include "app.hpp"
2 #include "redfish.hpp"
3 
4 #include <string>
5 
6 #include <gmock/gmock.h>
7 #include <gtest/gtest.h>
8 
9 namespace redfish
10 {
11 namespace
12 {
13 using ::testing::EndsWith;
14 
TEST(Redfish,PathsShouldValidate)15 TEST(Redfish, PathsShouldValidate)
16 {
17     crow::App app;
18 
19     RedfishService redfish(app);
20 
21     app.validate();
22 
23     for (const std::string* route : app.getRoutes())
24     {
25         ASSERT_NE(route, nullptr);
26         EXPECT_THAT(*route, EndsWith("/"));
27     }
28 }
29 
30 } // namespace
31 } // namespace redfish
32