Updating references
This commit is contained in:
+71
-79
@@ -1,4 +1,4 @@
|
||||
use textsender_api::db;
|
||||
use schedtxt_api::db;
|
||||
|
||||
mod db_mgr {
|
||||
use std::str::FromStr;
|
||||
@@ -101,7 +101,7 @@ mod db_mgr {
|
||||
|
||||
mod init {
|
||||
pub async fn app(pool: sqlx::PgPool) -> axum::Router {
|
||||
textsender_api::config::init::routes()
|
||||
schedtxt_api::config::init::routes()
|
||||
.await
|
||||
.layer(axum::Extension(pool))
|
||||
.layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024))
|
||||
@@ -136,8 +136,8 @@ mod util {
|
||||
pub fn token_fields() -> (String, String, String) {
|
||||
(
|
||||
String::from("What a twist!"),
|
||||
String::from("textsender_test"),
|
||||
String::from("textsender"),
|
||||
String::from("schedtxt_test"),
|
||||
String::from("schedtxt"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ mod request {
|
||||
|
||||
match run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::ADD_CONTACT,
|
||||
schedtxt_api::caller::endpoints::ADD_CONTACT,
|
||||
axum::http::Method::POST,
|
||||
true,
|
||||
)
|
||||
@@ -257,11 +257,7 @@ mod request {
|
||||
app: &axum::Router,
|
||||
id: &uuid::Uuid,
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = format!(
|
||||
"{}?id={}",
|
||||
textsender_api::caller::endpoints::GET_CONTACT,
|
||||
id
|
||||
);
|
||||
let uri = format!("{}?id={}", schedtxt_api::caller::endpoints::GET_CONTACT, id);
|
||||
|
||||
match run_post(None, &uri, axum::http::Method::GET, false).await {
|
||||
Ok(req) => match app.clone().oneshot(req).await {
|
||||
@@ -289,7 +285,7 @@ mod request {
|
||||
|
||||
match run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::UPDATE_CONTACT_NAME,
|
||||
schedtxt_api::caller::endpoints::UPDATE_CONTACT_NAME,
|
||||
axum::http::Method::PATCH,
|
||||
true,
|
||||
)
|
||||
@@ -316,7 +312,7 @@ mod request {
|
||||
|
||||
match super::run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::ADD_MESSAGE,
|
||||
schedtxt_api::caller::endpoints::ADD_MESSAGE,
|
||||
axum::http::Method::POST,
|
||||
true,
|
||||
)
|
||||
@@ -334,11 +330,7 @@ mod request {
|
||||
app: &axum::Router,
|
||||
id: &uuid::Uuid,
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = format!(
|
||||
"{}?id={}",
|
||||
textsender_api::caller::endpoints::GET_MESSAGE,
|
||||
id
|
||||
);
|
||||
let uri = format!("{}?id={}", schedtxt_api::caller::endpoints::GET_MESSAGE, id);
|
||||
|
||||
match super::run_post(None, &uri, axum::http::Method::GET, false).await {
|
||||
Ok(req) => match app.clone().oneshot(req).await {
|
||||
@@ -379,7 +371,7 @@ mod request {
|
||||
|
||||
match super::super::run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::RECORD_MESSAGE_EVENT_RESPONSE,
|
||||
schedtxt_api::caller::endpoints::RECORD_MESSAGE_EVENT_RESPONSE,
|
||||
axum::http::Method::POST,
|
||||
true,
|
||||
)
|
||||
@@ -399,7 +391,7 @@ mod request {
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = format!(
|
||||
"{}?id={}",
|
||||
textsender_api::caller::endpoints::GET_MESSAGE_EVENT_RESPONSE,
|
||||
schedtxt_api::caller::endpoints::GET_MESSAGE_EVENT_RESPONSE,
|
||||
id
|
||||
);
|
||||
|
||||
@@ -436,7 +428,7 @@ mod request {
|
||||
|
||||
match super::super::run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::SCHEDULE_MESSAGE,
|
||||
schedtxt_api::caller::endpoints::SCHEDULE_MESSAGE,
|
||||
axum::http::Method::POST,
|
||||
true,
|
||||
)
|
||||
@@ -456,7 +448,7 @@ mod request {
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = format!(
|
||||
"{}?id={}",
|
||||
textsender_api::caller::endpoints::GET_SCHEDULE_MESSAGE,
|
||||
schedtxt_api::caller::endpoints::GET_SCHEDULE_MESSAGE,
|
||||
id
|
||||
);
|
||||
|
||||
@@ -474,7 +466,7 @@ mod request {
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
match super::super::run_post(
|
||||
None,
|
||||
textsender_api::caller::endpoints::FETCH_SCHEDULED_MESSAGE,
|
||||
schedtxt_api::caller::endpoints::FETCH_SCHEDULED_MESSAGE,
|
||||
axum::http::Method::GET,
|
||||
false,
|
||||
)
|
||||
@@ -493,7 +485,7 @@ mod request {
|
||||
id: &uuid::Uuid,
|
||||
updated_status: &str,
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = textsender_api::caller::endpoints::UPDATE_SCHEDULED_MESSAGE_STATUS;
|
||||
let uri = schedtxt_api::caller::endpoints::UPDATE_SCHEDULED_MESSAGE_STATUS;
|
||||
let payload = serde_json::json!({
|
||||
"scheduled_message_id": id,
|
||||
"status": updated_status
|
||||
@@ -526,7 +518,7 @@ mod request {
|
||||
|
||||
match super::super::run_post(
|
||||
Some(&payload),
|
||||
textsender_api::caller::endpoints::CREATE_SCHEDULED_MESSAGE_EVENT,
|
||||
schedtxt_api::caller::endpoints::CREATE_SCHEDULED_MESSAGE_EVENT,
|
||||
axum::http::Method::POST,
|
||||
true,
|
||||
)
|
||||
@@ -546,7 +538,7 @@ mod request {
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = format!(
|
||||
"{}?scheduled_message_id={}",
|
||||
textsender_api::caller::endpoints::GET_SCHEDULED_MESSAGE_EVENT,
|
||||
schedtxt_api::caller::endpoints::GET_SCHEDULED_MESSAGE_EVENT,
|
||||
scheduled_message_id
|
||||
);
|
||||
|
||||
@@ -564,7 +556,7 @@ mod request {
|
||||
scheduled_message_event_id: &uuid::Uuid,
|
||||
) -> Result<axum::response::Response, axum::http::Error> {
|
||||
let uri = super::super::super::util::format_url_with_value(
|
||||
textsender_api::caller::endpoints::DELETE_SCHEDULED_MESSAGE_EVENT,
|
||||
schedtxt_api::caller::endpoints::DELETE_SCHEDULED_MESSAGE_EVENT,
|
||||
scheduled_message_event_id,
|
||||
)
|
||||
.await;
|
||||
@@ -624,7 +616,7 @@ async fn test_create_contact() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -646,7 +638,7 @@ async fn test_get_contact() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -656,7 +648,7 @@ async fn test_get_contact() {
|
||||
match request::get_contact(&app, &id).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::GetContactResponse,
|
||||
schedtxt_api::caller::contact::response::GetContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(
|
||||
@@ -689,7 +681,7 @@ async fn test_update_contact_names() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -699,7 +691,7 @@ async fn test_update_contact_names() {
|
||||
match request::get_contact(&app, &id).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::GetContactResponse,
|
||||
schedtxt_api::caller::contact::response::GetContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(
|
||||
@@ -737,7 +729,7 @@ async fn test_update_contact_names() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::UpdateContactNamesResponse,
|
||||
schedtxt_api::caller::contact::response::UpdateContactNamesResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Error updating Contact names");
|
||||
@@ -764,7 +756,7 @@ async fn test_create_message() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -792,7 +784,7 @@ async fn test_get_message() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -815,7 +807,7 @@ async fn test_get_message() {
|
||||
match request::message::get_message(&app, &message_id).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::GetMessageResponse,
|
||||
schedtxt_api::caller::message::response::GetMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -836,7 +828,7 @@ async fn test_schedule_message() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -859,7 +851,7 @@ async fn test_get_scheduled_message() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -875,7 +867,7 @@ async fn test_get_scheduled_message() {
|
||||
match request::message::scheduling::get_scheduled_messages(&app, &parsed_id).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -903,7 +895,7 @@ async fn test_create_scheduled_message_event() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -917,7 +909,7 @@ async fn test_create_scheduled_message_event() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -932,7 +924,7 @@ async fn test_create_scheduled_message_event() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -953,7 +945,7 @@ async fn test_create_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -978,7 +970,7 @@ async fn test_get_scheduled_message_event() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -992,7 +984,7 @@ async fn test_get_scheduled_message_event() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1007,7 +999,7 @@ async fn test_get_scheduled_message_event() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1028,7 +1020,7 @@ async fn test_get_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1043,7 +1035,7 @@ async fn test_get_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1068,7 +1060,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1082,7 +1074,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1097,7 +1089,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1118,7 +1110,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1133,7 +1125,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1146,7 +1138,7 @@ async fn test_delete_scheduled_message_event() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::DeleteScheduledMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::DeleteScheduledMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1176,7 +1168,7 @@ async fn test_update_scheduled_message_status() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1190,7 +1182,7 @@ async fn test_update_scheduled_message_status() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1205,7 +1197,7 @@ async fn test_update_scheduled_message_status() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1226,7 +1218,7 @@ async fn test_update_scheduled_message_status() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1245,7 +1237,7 @@ async fn test_update_scheduled_message_status() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1270,7 +1262,7 @@ async fn test_fetch_scheduled_message() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1284,7 +1276,7 @@ async fn test_fetch_scheduled_message() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1299,7 +1291,7 @@ async fn test_fetch_scheduled_message() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1320,7 +1312,7 @@ async fn test_fetch_scheduled_message() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1339,7 +1331,7 @@ async fn test_fetch_scheduled_message() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1352,7 +1344,7 @@ async fn test_fetch_scheduled_message() {
|
||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1378,7 +1370,7 @@ async fn test_record_message_event_response() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1392,7 +1384,7 @@ async fn test_record_message_event_response() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1407,7 +1399,7 @@ async fn test_record_message_event_response() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1428,7 +1420,7 @@ async fn test_record_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1449,7 +1441,7 @@ async fn test_record_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1462,7 +1454,7 @@ async fn test_record_message_event_response() {
|
||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1489,7 +1481,7 @@ async fn test_record_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::event::response::RecordMessageEventResponse,
|
||||
schedtxt_api::caller::message::event::response::RecordMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1515,7 +1507,7 @@ async fn test_get_message_event_response() {
|
||||
match request::create_contact(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::contact::response::AddContactResponse,
|
||||
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1529,7 +1521,7 @@ async fn test_get_message_event_response() {
|
||||
match request::message::create_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::response::AddMessageResponse,
|
||||
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1544,7 +1536,7 @@ async fn test_get_message_event_response() {
|
||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1565,7 +1557,7 @@ async fn test_get_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1586,7 +1578,7 @@ async fn test_get_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1599,7 +1591,7 @@ async fn test_get_message_event_response() {
|
||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1626,7 +1618,7 @@ async fn test_get_message_event_response() {
|
||||
{
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::event::response::RecordMessageEventResponse,
|
||||
schedtxt_api::caller::message::event::response::RecordMessageEventResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
@@ -1634,7 +1626,7 @@ async fn test_get_message_event_response() {
|
||||
match request::message::event::get_message_event_response(&app, &mer.id).await {
|
||||
Ok(response) => {
|
||||
let resp = util::get_resp_data::<
|
||||
textsender_api::caller::message::event::response::GetMERResponse,
|
||||
schedtxt_api::caller::message::event::response::GetMERResponse,
|
||||
>(response)
|
||||
.await;
|
||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||
|
||||
Reference in New Issue
Block a user