check the entire profile in storage
@@ -224,8 +224,9 @@ fn actionctx_login() {
.unwrap()
.get(PROFILE_STORAGE_KEY)
.map_or(true, |data| {
- serde_json::from_str::<Profile>(&data).unwrap().auth
- } == Some(Auth {
+ serde_json::from_str::<Profile>(&data).unwrap()
+ } == Profile {
+ auth: Some(Auth {
key: "auth_key".to_owned(),
user: User {
id: "user_id".to_owned(),
@@ -235,7 +236,10 @@ fn actionctx_login() {
last_modified: Env::now(),
date_registered: Env::now(),
},
- })),
+ }),
+ addons: vec![],
+ ..Default::default()
+ },),
"profile updated successfully in storage"
);
assert!(
@@ -390,8 +394,9 @@ fn actionctx_signup() {
.unwrap()
.get(PROFILE_STORAGE_KEY)
.map_or(true, |data| {
- serde_json::from_str::<Profile>(&data).unwrap().auth
- } == Some(Auth {
+ serde_json::from_str::<Profile>(&data).unwrap()
+ } == Profile {
+ auth: Some(Auth {
key: "auth_key".to_owned(),
user: User {
id: "user_id".to_owned(),
@@ -401,7 +406,10 @@ fn actionctx_signup() {
last_modified: Env::now(),
date_registered: Env::now(),
},
- })),
+ }),
+ addons: vec![],
+ ..Default::default()
+ },),
"profile updated successfully in storage"
);
assert!(
