Skip to content

Commit

Permalink
fix link and test it
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Sep 15, 2024
1 parent 66090ed commit d96521f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test_resend_email_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn get_resend_email_verification_guest() {
let html = res.into_string().unwrap();
check_html!(&html, "title", "Resend code for email verification");
check_html!(&html, "h1", "Resend code for email verification");
assert!(html.contains(r#"<form method="POST" action="/resend-verification">"#));
assert!(html.contains(r#"<form method="POST" action="/resend-email-verification-code">"#));
assert!(html.contains(r#"Email: <input name="email" class="input" id="email" type="email" placeholder="Email">"#));
assert!(html.contains(r#"<input type="submit" class="button" value="Send code">"#));
});
Expand Down
4 changes: 4 additions & 0 deletions src/test_static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ fn get_login_page() {
assert!(html.contains(r#"Email: <input name="email" class="input" id="email" type="email" placeholder="Email">"#));
assert!(html.contains(r#"Password: <input name="password" class="input" id="password" type="password" placeholder=Password">"#));
assert!(html.contains(r#"<input type="submit" value="Login" class="button">"#));
assert!(html.contains(r#"<a href="/reset-password">Reset password</a><br>"#));
assert!(html.contains(
r#"<a href="/resend-email-verification-code">Resend e-mail verification</a><br>"#
));
});
}
1 change: 0 additions & 1 deletion templates/login.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<hr>
<a href="/reset-password">Reset password</a><br>
<a href="/resend-email-verification-code">Resend e-mail verification</a><br>


</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/resend_verification.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="content">
<h1 class="title is-3">{{title}}</h1>

<form method="POST" action="/resend-verification">
<form method="POST" action="/resend-email-verification-code">
Email: <input name="email" class="input" id="email" type="email" placeholder="Email">
<input type="submit" class="button" value="Send code">
</form>
Expand Down

0 comments on commit d96521f

Please sign in to comment.