package connectsrv

import "testing"

func TestRobokassaChannel(t *testing.T) {
	cases := map[string]string{
		"/pay/robokassa/result":         "", // legacy bare path → the backend defaults to the web shop
		"/pay/robokassa/result/":        "", // trailing slash, no channel → the web default
		"/pay/robokassa/result/web":     "web",
		"/pay/robokassa/result/android": "android",
	}
	for path, want := range cases {
		if got := robokassaChannel(path); got != want {
			t.Errorf("robokassaChannel(%q) = %q, want %q", path, got, want)
		}
	}
}
