MCPcopy Create free account
hub / github.com/daodst/chat / TestFlowCheckingCompleteFlowOrdered

Function TestFlowCheckingCompleteFlowOrdered

clientapi/routing/register_test.go:46–55  ·  view source on GitHub ↗

Should return true as we're completing all the stages of a single flow in order.

(t *testing.T)

Source from the content-addressed store, hash-verified

44// Should return true as we're completing all the stages of a single flow in
45// order.
46func TestFlowCheckingCompleteFlowOrdered(t *testing.T) {
47 testFlow := []authtypes.LoginType{
48 authtypes.LoginType("stage1"),
49 authtypes.LoginType("stage3"),
50 }
51
52 if !checkFlowCompleted(testFlow, allowedFlows) {
53 t.Error("Incorrect registration flow verification: ", testFlow, ", from allowed flows: ", allowedFlows, ". Should be true.")
54 }
55}
56
57// Should return false as all stages in a single flow need to be completed.
58func TestFlowCheckingStagesFromDifferentFlows(t *testing.T) {

Callers

nothing calls this directly

Calls 2

checkFlowCompletedFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected