github.com/drycc/workflow-cli@v1.5.3-0.20240322092846-d4ee25983af9/cmd/shortcuts_test.go (about) 1 package cmd 2 3 import ( 4 "testing" 5 ) 6 7 func TestShortcutsList(t *testing.T) { 8 t.Parallel() 9 10 expected := `create -> apps:create 11 destroy -> apps:destroy 12 info -> apps:info 13 login -> auth:login 14 logout -> auth:logout 15 logs -> apps:logs 16 open -> apps:open 17 pull -> builds:create 18 rollback -> releases:rollback 19 run -> apps:run 20 scale -> ps:scale 21 sharing -> perms:list 22 sharing:add -> perms:create 23 sharing:list -> perms:list 24 sharing:remove -> perms:delete 25 whoami -> auth:whoami 26 ` 27 actual := sortShortcuts() 28 if actual != expected { 29 t.Errorf("Expected %s, Got %s", expected, actual) 30 } 31 32 }