Skip to content

Commit

Permalink
Changes double quotes to backticks in menu template tests, to match t…
Browse files Browse the repository at this point in the history
…he type of input k2 gives us. (#1121)
  • Loading branch information
CJ Barrett authored Apr 7, 2023
1 parent a7ade24 commit 6380a0c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ee/desktop/menu/menu_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
{
Expand Down

0 comments on commit 6380a0c

Please sign in to comment.