Minor updates.

master
Orville Bennett 6 months ago
parent 2c4949e19a
commit 9bb7c48d6b
  1. 2
      Rocket.toml.template
  2. 2
      src/strings.rs
  3. 7
      src/tests.rs

@ -3,5 +3,7 @@ certs = "/path/to/fullchain.cer"
key = "/path/to/site.dev.key"
[application]
# Can be overriden by environment variable FORM_SUBMISSION_destination_email
destination_email = "test@domain.com"
# Can be overriden by environment variable FORM_SUBMISSION_sending_email
sending_email = "noreply@domain.com"

@ -1,4 +1,2 @@
pub const SUCCESS_MSG: &str = "Thank you! We'll get in touch as soon as we're able to.";
pub const WELCOME_MSG: &str = "for·mu·late, verb, to create or devise methodically.";
pub const EMAIL_VALIDATION_MSG: &str =
"Invalid email address provided. Please check email and try again.";

@ -1,9 +1,12 @@
#[cfg(test)]
use super::rocket;
use super::strings::{EMAIL_VALIDATION_MSG, WELCOME_MSG};
use super::strings::WELCOME_MSG;
use rocket::http::{ContentType, Status};
use rocket::local::blocking::{Client, LocalResponse};
const EMAIL_VALIDATION_MSG: &str =
"Invalid email address provided. Please check email and try again.";
mod mail_variants {
pub const EMAIL_MISSING_PARTS: (&str, &str) = ("testtest.com", "Missing domain or user");
pub const EMAIL_UNBALANCED: (&str, &str) =
@ -82,7 +85,7 @@ fn test_submit() {
#[test]
fn test_submit_json() {
let email_valid = "publico@thebennettproject.com";
let email_valid = "test@test.com";
match Client::tracked(rocket()) {
Ok(client) => {

Loading…
Cancel
Save