We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0d0b95 commit c11d3c4Copy full SHA for c11d3c4
2 files changed
.changeset/test-encrypted-token-storage-new.md
@@ -0,0 +1,5 @@
1
+---
2
+"@googleworkspace/cli": patch
3
4
+
5
+Added test coverage for `EncryptedTokenStorage::new` initialization.
src/token_storage.rs
@@ -132,3 +132,20 @@ impl TokenStorage for EncryptedTokenStorage {
132
None
133
}
134
135
136
+#[cfg(test)]
137
+mod tests {
138
+ use super::*;
139
+ use std::path::PathBuf;
140
141
+ #[tokio::test]
142
+ async fn test_encrypted_token_storage_new() {
143
+ let path = PathBuf::from("/fake/path/to/token.json");
144
+ let storage = EncryptedTokenStorage::new(path.clone());
145
146
+ assert_eq!(storage.file_path, path);
147
148
+ let cache_lock = storage.cache.lock().await;
149
+ assert!(cache_lock.is_none());
150
+ }
151
+}
0 commit comments