Skip to content

Commit e256d8d

Browse files
committed
test: Check TorrentID and torrent name
1 parent 63f56b0 commit e256d8d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/qbittorrent.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ static LOCK: OnceCell<Mutex<QBittorrentClient>> = OnceCell::const_new();
2525
static V1_MAGNET: &str = "magnet:?xt=urn:btih:2c6e17017f6bb87125b2ba98c56a67f8ffe7e02c&dn=tails-amd64-5.6-img&tr=udp%3a%2f%2ftracker.torrent.eu.org%3a451&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969";
2626
// static V1_TORRENT: &[u8] = include_bytes!("tails-amd64-5.6.img.torrent");
2727
static V1_V1HASH: &str = "2c6e17017f6bb87125b2ba98c56a67f8ffe7e02c";
28-
// static V1_ID: &str = "2c6e17017f6bb87125b2ba98c56a67f8ffe7e02c";
29-
// static V1_NAME: &str = "tails-amd64-5.6.img";
28+
static V1_ID: &str = "2c6e17017f6bb87125b2ba98c56a67f8ffe7e02c";
29+
static V1_NAME: &str = "tails-amd64-5.6-img";
3030

3131
async fn client() -> MutexGuard<'static, QBittorrentClient> {
3232
LOCK.get_or_init(|| async {
@@ -66,6 +66,10 @@ async fn magnet_v1() -> Result<(), ApiError> {
6666
let entry = list.get(&target);
6767
assert!(entry.is_some());
6868

69+
let entry = entry.unwrap();
70+
assert_eq!(entry.hash.id().as_str(), V1_ID);
71+
assert_eq!(entry.name.as_str(), V1_NAME);
72+
6973
// Remove torrent
7074
api.remove(&target, true).await?;
7175

0 commit comments

Comments
 (0)