From 6380a0c3d059024109ae75f52bed04e2ae469f0a Mon Sep 17 00:00:00 2001 From: CJ Barrett Date: Fri, 7 Apr 2023 07:50:49 -0400 Subject: [PATCH] Changes double quotes to backticks in menu template tests, to match the type of input k2 gives us. (#1121) --- ee/desktop/menu/menu_template_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ee/desktop/menu/menu_template_test.go b/ee/desktop/menu/menu_template_test.go index 366d410d8..21c779e2c 100644 --- a/ee/desktop/menu/menu_template_test.go +++ b/ee/desktop/menu/menu_template_test.go @@ -40,55 +40,55 @@ func Test_Parse(t *testing.T) { { name: "unsupported capability", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: "This capability is {{if hasCapability \"bad capability\"}}supported{{else}}unsupported{{end}}.", + text: "This capability is {{if hasCapability `bad capability`}}supported{{else}}unsupported{{end}}.", output: "This capability is unsupported.", }, { name: "relativeTime very soon", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(2*time.Minute+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(2*time.Minute+30*time.Second).Unix()), output: "This Is Starting Very Soon.", }, { name: "relativeTime 15 minutes", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(15*time.Minute+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(15*time.Minute+30*time.Second).Unix()), output: "This Is Starting In 15 Minutes.", }, { name: "relativeTime one hour", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(1*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(1*time.Hour+30*time.Second).Unix()), output: "This Is Starting In About An Hour.", }, { name: "relativeTime four hours", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(4*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(4*time.Hour+30*time.Second).Unix()), output: "This Is Starting In 4 Hours.", }, { name: "relativeTime one day", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(24*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(24*time.Hour+30*time.Second).Unix()), output: "This Is Starting In One Day.", }, { name: "relativeTime three days", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(3*24*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(3*24*time.Hour+30*time.Second).Unix()), output: "This Is Starting In 3 Days.", }, { name: "relativeTime seven days", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(7*24*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(7*24*time.Hour+30*time.Second).Unix()), output: "This Is Starting In 7 Days.", }, { name: "relativeTime two weeks", td: &TemplateData{ServerHostname: "localhost", LauncherVersion: "0.0.0"}, - text: fmt.Sprintf("This Is Starting {{if hasCapability \"relativeTime\"}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(14*24*time.Hour+30*time.Second).Unix()), + text: fmt.Sprintf("This Is Starting {{if hasCapability `relativeTime`}}{{relativeTime %d}}{{else}}never{{end}}.", time.Now().Add(14*24*time.Hour+30*time.Second).Unix()), output: "This Is Starting In 2 Weeks.", }, {