storage profile check updated
@@ -215,11 +215,18 @@ fn actionctx_login() {
.unwrap()
.get(PROFILE_STORAGE_KEY)
.map_or(true, |data| {
- serde_json::from_str::<Profile>(&data)
- .unwrap()
- .auth
- .is_some()
- }),
+ serde_json::from_str::<Profile>(&data).unwrap().auth
+ } == Some(Auth {
+ key: "auth_key".to_owned(),
+ user: User {
+ id: "user_id".to_owned(),
+ email: "user_email".to_owned(),
+ fb_id: None,
+ avatar: None,
+ last_modified: Env::now(),
+ date_registered: Env::now(),
+ },
+ })),
"profile updated successfully in storage"
);
// TODO library updated successfully in storage
@@ -365,11 +372,18 @@ fn actionctx_signup() {
.unwrap()
.get(PROFILE_STORAGE_KEY)
.map_or(true, |data| {
- serde_json::from_str::<Profile>(&data)
- .unwrap()
- .auth
- .is_some()
- }),
+ serde_json::from_str::<Profile>(&data).unwrap().auth
+ } == Some(Auth {
+ key: "auth_key".to_owned(),
+ user: User {
+ id: "user_id".to_owned(),
+ email: "user_email".to_owned(),
+ fb_id: None,
+ avatar: None,
+ last_modified: Env::now(),
+ date_registered: Env::now(),
+ },
+ })),
"profile updated successfully in storage"
);
// TODO library updated successfully in storage
