authgear / authgear-sms-gateway

0 stars 1 forks source link

Add tests #7

Open louischan-oursky opened 2 hours ago

louischan-oursky commented 2 hours ago

Add tests for the selection or matching logic

The tests should be easy to read, and easy to add

func TestSelection(t *testing.T) {
  test := func(configYAML string, expectedName string) {
    // Parse the configYAML, call the function, and assert the result
  }
  test(`
# The YAML here
`, "foobar")
  test(`
# The YAML here
`, "foobar")
}
linear[bot] commented 2 hours ago

DEV-2091 Add tests

louischan-oursky commented 2 hours ago

@chankiyu22