-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from mainmatter/fix-company-handling
fix handling of company name
- Loading branch information
Showing
2 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ async fn it_works_for_the_happy_path() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("Digital Products & Design")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
|
||
|
@@ -53,7 +53,7 @@ async fn it_sends_the_right_payload_to_sendgrid() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("Digital Products & Design")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -89,7 +89,7 @@ async fn it_sends_an_empty_message_if_none_is_provided() { | |
email: String::from("[email protected]"), | ||
message: String::from(""), | ||
service: Some(String::from("Digital Products & Design")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -125,7 +125,7 @@ async fn it_leaves_out_the_service_if_an_empty_one_is_provided() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -161,7 +161,7 @@ async fn it_leaves_out_the_service_if_none_is_provided() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: None, | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -197,7 +197,7 @@ async fn it_leaves_out_the_service_if_other_is_provided() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("Other")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -233,7 +233,7 @@ async fn it_adds_company_to_the_subject_if_one_is_provided() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("Other")), | ||
company: Some(String::from("Company")), | ||
company: String::from("Company"), | ||
}; | ||
let _result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
} | ||
|
@@ -249,7 +249,7 @@ async fn it_responds_with_502_if_sendgrid_errors() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
|
||
|
@@ -267,7 +267,7 @@ async fn it_responds_with_500_if_calling_sendgrid_errors() { | |
email: String::from("[email protected]"), | ||
message: String::from("Hi!"), | ||
service: Some(String::from("")), | ||
company: None, | ||
company: String::from(""), | ||
}; | ||
let result = send_message(payload, "api_key", "[email protected]", &request_sendgrid).await; | ||
|
||
|