Skip to content

Commit

Permalink
fix(test): remove backdated unit test and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
3N4N committed Aug 20, 2023
1 parent 08c2089 commit edb68d3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 84 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "twitchlink"
version = "1.0.0"
version = "1.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
39 changes: 0 additions & 39 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,42 +225,3 @@ fn main() {
print_stream_links(user_arg);
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_estimate_vod_link() {
let vod_info = r#"
{
"data": [
{
"created_at": "2023-04-26T17:03:25Z",
"description": "",
"duration": "6h46m38s",
"id": "1804186756",
"language": "en",
"muted_segments": null,
"published_at": "2023-04-26T17:03:25Z",
"stream_id": "48380328493",
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/51b4df78ae6d180ce585_elizabethzaks_48380328493_1682528600//thumb/thumb0-%{width}x%{height}.jpg",
"title": "RE8 FINALE AND SPOOKS W/ @nikkiblackketter !socials",
"type": "archive",
"url": "https://www.twitch.tv/videos/1804186756",
"user_id": "214714452",
"user_login": "elizabethzaks",
"user_name": "ElizabethZaks",
"view_count": 1262,
"viewable": "public"
}
],
"pagination": {}
}"#;

let vod_link = estimate_vod_link(vod_info.to_string())
.expect("[FAIL] Cannot estimate VOD link.");
println!("{}", vod_link);
assert_eq!(vod_link, "https://d1m7jfoe9zdc1j.cloudfront.net/51b4df78ae6d180ce585_elizabethzaks_48380328493_1682528600/720p60/index-dvr.m3u8");
}
}

0 comments on commit edb68d3

Please sign in to comment.