blob: a5495829251e60a253d30ef0c676f75ac536ab10 [file] [log] [blame]
Patrick Ventured53d60a2020-04-07 09:01:34 -07001#include "skip_action.hpp"
2#include "status.hpp"
3
4#include <gmock/gmock.h>
5#include <gtest/gtest.h>
6
7namespace ipmi_flash
8{
9namespace
10{
11
12TEST(SkipActionTest, ValidateTriggerReturnsTrue)
13{
14 SkipAction skip;
15 EXPECT_TRUE(skip.trigger());
16 EXPECT_TRUE(skip.trigger());
17}
18
19TEST(SkipActionTest, ValidateStatusAlwaysSuccess)
20{
21 SkipAction skip;
22 EXPECT_EQ(ActionStatus::success, skip.status());
23 EXPECT_TRUE(skip.trigger());
24 EXPECT_EQ(ActionStatus::success, skip.status());
25}
26
27TEST(SkipActionTest, AbortHasNoImpactOnStatus)
28{
29 SkipAction skip;
30 EXPECT_EQ(ActionStatus::success, skip.status());
31 skip.abort();
32 EXPECT_EQ(ActionStatus::success, skip.status());
33}
34
35} // namespace
36} // namespace ipmi_flash