mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-26 16:52:12 +05:30
Add spec for extract_plid
This commit is contained in:
parent
3b2e142542
commit
80fc60b5e2
@ -9,6 +9,7 @@ require "../src/invidious/channels"
|
|||||||
require "../src/invidious/comments"
|
require "../src/invidious/comments"
|
||||||
require "../src/invidious/playlists"
|
require "../src/invidious/playlists"
|
||||||
require "../src/invidious/search"
|
require "../src/invidious/search"
|
||||||
|
require "../src/invidious/trending"
|
||||||
require "../src/invidious/users"
|
require "../src/invidious/users"
|
||||||
|
|
||||||
describe "Helper" do
|
describe "Helper" do
|
||||||
@ -124,6 +125,15 @@ describe "Helper" do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#extract_plid" do
|
||||||
|
it "correctly extracts playlist ID from trending URL" do
|
||||||
|
extract_plid("/feed/trending?bp=4gIuCggvbS8wNHJsZhIiUExGZ3F1TG5MNTlhbVBud2pLbmNhZUp3MDYzZlU1M3Q0cA%3D%3D").should eq("PLFgquLnL59amPnwjKncaeJw063fU53t4p")
|
||||||
|
extract_plid("/feed/trending?bp=4gIvCgkvbS8wYnp2bTISIlBMaUN2Vkp6QnVwS2tDaFNnUDdGWFhDclo2aEp4NmtlTm0%3D").should eq("PLiCvVJzBupKkChSgP7FXXCrZ6hJx6keNm")
|
||||||
|
extract_plid("/feed/trending?bp=4gIuCggvbS8wNWpoZxIiUEwzWlE1Q3BOdWxRbUtPUDNJekdsYWN0V1c4dklYX0hFUA%3D%3D").should eq("PL3ZQ5CpNulQmKOP3IzGlactWW8vIX_HEP")
|
||||||
|
extract_plid("/feed/trending?bp=4gIuCggvbS8wMnZ4bhIiUEx6akZiYUZ6c21NUnFhdEJnVTdPeGNGTkZhQ2hqTkVERA%3D%3D").should eq("PLzjFbaFzsmMRqatBgU7OxcFNFaChjNEDD")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe "#sign_token" do
|
describe "#sign_token" do
|
||||||
it "correctly signs a given hash" do
|
it "correctly signs a given hash" do
|
||||||
token = {
|
token = {
|
||||||
|
Loading…
Reference in New Issue
Block a user