Should return true as we complete all stages of an allowed flow, though out of order, as well as extraneous stages.
(t *testing.T)
| 101 | // Should return true as we complete all stages of an allowed flow, though out |
| 102 | // of order, as well as extraneous stages. |
| 103 | func TestFlowCheckingExtraneousUnordered(t *testing.T) { |
| 104 | testFlow := []authtypes.LoginType{ |
| 105 | authtypes.LoginType("stage5"), |
| 106 | authtypes.LoginType("stage4"), |
| 107 | authtypes.LoginType("stage3"), |
| 108 | authtypes.LoginType("stage2"), |
| 109 | authtypes.LoginType("stage1"), |
| 110 | } |
| 111 | if !checkFlowCompleted(testFlow, allowedFlows) { |
| 112 | t.Error("Incorrect registration flow verification: ", testFlow, ", from allowed flows: ", allowedFlows, ". Should be true.") |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // Should return false as we're providing fewer stages than are required. |
| 117 | func TestFlowCheckingShortIncorrectInput(t *testing.T) { |
nothing calls this directly
no test coverage detected