fix(auth): revoke desktop sessions safely
This commit is contained in:
@@ -39,13 +39,21 @@ fn default_sync_status_reflects_local_browser_state() -> Result<(), Box<dyn Erro
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unavailable_credentials_disable_cloud_uploads() -> Result<(), Box<dyn Error>> {
|
||||
fn auth_transition_states_disable_cloud_uploads() -> Result<(), Box<dyn Error>> {
|
||||
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
|
||||
core.set_sync_connection_state(SyncConnectionState::CredentialUnavailable {
|
||||
message: "credential unavailable".to_string(),
|
||||
});
|
||||
let blocked_states = [
|
||||
SyncConnectionState::CredentialUnavailable {
|
||||
message: "credential unavailable".to_string(),
|
||||
},
|
||||
SyncConnectionState::SigningOut,
|
||||
SyncConnectionState::SignOutError { message: "retry sign out".to_string() },
|
||||
];
|
||||
|
||||
for state in blocked_states {
|
||||
core.set_sync_connection_state(state);
|
||||
assert!(!core.cloud_sync_upload_enabled());
|
||||
}
|
||||
|
||||
assert!(!core.cloud_sync_upload_enabled());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user