fix: update to reflect groups as tagging
This commit is contained in:
parent
190dad39b6
commit
055088d11e
2
api
2
api
@ -1 +1 @@
|
|||||||
Subproject commit 46eaa4958691bb0b94fa985d5844a26eac29e93f
|
Subproject commit 74701aa0c5bd96c4efc323d3031825be879a6988
|
@ -31,16 +31,16 @@ pub fn user_signup() {
|
|||||||
let rep_json =
|
let rep_json =
|
||||||
serde_json::from_slice::<serde_json::Value>(rep.data().payload().as_bytes()).unwrap();
|
serde_json::from_slice::<serde_json::Value>(rep.data().payload().as_bytes()).unwrap();
|
||||||
|
|
||||||
let signup_link = rep_json.as_object()
|
let groups = rep_json.as_object()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get("links")
|
.get("links")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_object()
|
.as_object()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get("user_signup")
|
.get("groups")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_str()
|
.as_str()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let session = rep_json.as_object()
|
let session = rep_json.as_object()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@ -49,8 +49,8 @@ pub fn user_signup() {
|
|||||||
.as_str()
|
.as_str()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let get_signup =
|
let get_groups =
|
||||||
Message::builder(Type::Con, Code::GET).path(signup_link)
|
Message::builder(Type::Con, Code::GET).path(groups)
|
||||||
.accept(ContentFormat::Json)
|
.accept(ContentFormat::Json)
|
||||||
.content_format(ContentFormat::Json)
|
.content_format(ContentFormat::Json)
|
||||||
.payload(serde_json::to_vec(&serde_json::json!({
|
.payload(serde_json::to_vec(&serde_json::json!({
|
||||||
@ -58,7 +58,7 @@ pub fn user_signup() {
|
|||||||
})).unwrap())
|
})).unwrap())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let get_signup = Addrd(get_signup, fx.api_addr);
|
let get_signup = Addrd(get_groups, fx.api_addr);
|
||||||
|
|
||||||
let rep = nb::block!({
|
let rep = nb::block!({
|
||||||
std::thread::sleep(std::time::Duration::from_millis(100));
|
std::thread::sleep(std::time::Duration::from_millis(100));
|
||||||
@ -70,11 +70,11 @@ pub fn user_signup() {
|
|||||||
let rep_json =
|
let rep_json =
|
||||||
serde_json::from_slice::<serde_json::Value>(rep.data().payload().as_bytes()).unwrap();
|
serde_json::from_slice::<serde_json::Value>(rep.data().payload().as_bytes()).unwrap();
|
||||||
|
|
||||||
let status = rep_json.as_object()
|
let unverified_email =
|
||||||
.unwrap()
|
rep_json.as_array().unwrap().iter().any(|g| {
|
||||||
.get("status")
|
g.as_object().unwrap().get("tag").unwrap().as_str()
|
||||||
.unwrap()
|
== Some("unverified_email")
|
||||||
.as_str()
|
});
|
||||||
.unwrap();
|
|
||||||
assert_eq!(status, "email_verification_pending");
|
assert!(unverified_email);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user