wp plugin udapted v1.5.0
This commit is contained in:
@@ -8,20 +8,18 @@
|
||||
class Test_Revoke_Api_Key extends WP_UnitTestCase {
|
||||
|
||||
public function test_revoke_api_key_clears_options() {
|
||||
// Simulate stored API key and tokens
|
||||
// Simulate stored connection data (simplified structure)
|
||||
update_option('igny8_api_key', 'test-key-123');
|
||||
update_option('igny8_access_token', 'test-key-123');
|
||||
update_option('igny8_refresh_token', 'refresh-123');
|
||||
update_option('igny8_token_refreshed_at', time());
|
||||
update_option('igny8_site_id', '12345');
|
||||
update_option('igny8_last_communication', time());
|
||||
|
||||
// Call revoke
|
||||
Igny8Admin::revoke_api_key();
|
||||
|
||||
// Assert removed
|
||||
// Assert core connection options removed
|
||||
$this->assertFalse(get_option('igny8_api_key'));
|
||||
$this->assertFalse(get_option('igny8_access_token'));
|
||||
$this->assertFalse(get_option('igny8_refresh_token'));
|
||||
$this->assertFalse(get_option('igny8_token_refreshed_at'));
|
||||
$this->assertFalse(get_option('igny8_site_id'));
|
||||
$this->assertFalse(get_option('igny8_last_communication'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user