Skip to content

Commit

Permalink
fix: mail renderer tests after text updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lfleischmann authored Jun 17, 2024
1 parent 7504445 commit 081ab4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/mail/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestRenderer_Render(t *testing.T) {
Name: "Login text template",
Template: "loginTextMail",
Lang: "en",
Expected: "Enter the following passcode on your login screen:\n\n123456\n\nThe passcode is valid for 5 minutes.",
Expected: "Enter the following passcode to verify your identity:\n\n123456\n\nThe passcode is valid for 5 minutes.",
WantErr: false,
},
{
Expand All @@ -48,14 +48,14 @@ func TestRenderer_Render(t *testing.T) {
Name: "Login text template with unknown language",
Template: "loginTextMail",
Lang: "xxx",
Expected: "Enter the following passcode on your login screen:\n\n123456\n\nThe passcode is valid for 5 minutes.",
Expected: "Enter the following passcode to verify your identity:\n\n123456\n\nThe passcode is valid for 5 minutes.",
WantErr: false,
},
{
Name: "Login text template without translations for language",
Template: "loginTextMail",
Lang: "es",
Expected: "Enter the following passcode on your login screen:\n\n123456\n\nThe passcode is valid for 5 minutes.",
Expected: "Enter the following passcode to verify your identity:\n\n123456\n\nThe passcode is valid for 5 minutes.",
WantErr: false,
},
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestRenderer_Translate(t *testing.T) {
"ServiceName": "Test Service",
"Code": "123456",
},
Expected: "Use passcode 123456 to sign in to Test Service",
Expected: "123456 is your passcode for Test Service",
},
}

Expand Down

0 comments on commit 081ab4e

Please sign in to comment.