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

Function TestFlowCheckingExtraneousIncorrectInput

clientapi/routing/register_test.go:127–137  ·  view source on GitHub ↗

Should return false as we're providing different stages than are required.

(t *testing.T)

Source from the content-addressed store, hash-verified

125
126// Should return false as we're providing different stages than are required.
127func TestFlowCheckingExtraneousIncorrectInput(t *testing.T) {
128 testFlow := []authtypes.LoginType{
129 authtypes.LoginType("stage8"),
130 authtypes.LoginType("stage9"),
131 authtypes.LoginType("stage10"),
132 authtypes.LoginType("stage11"),
133 }
134 if checkFlowCompleted(testFlow, allowedFlows) {
135 t.Error("Incorrect registration flow verification: ", testFlow, ", from allowed flows: ", allowedFlows, ". Should be false.")
136 }
137}
138
139// Completed flows stages should always be a valid slice header.
140// TestEmptyCompletedFlows checks that sessionsDict returns a slice & not nil.

Callers

nothing calls this directly

Calls 2

checkFlowCompletedFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected