Add parent channel info to ChannelExtractor: name, url & avatar url

This commit is contained in:
Roy Yosef
2020-04-13 23:33:44 +03:00
committed by wb9688
parent 665c69b530
commit 4234740baa
7 changed files with 134 additions and 0 deletions

View File

@@ -84,6 +84,16 @@ public class PeertubeChannelExtractorTest {
assertNotNull(extractor.getDescription());
}
@Test
public void testParentChannelName() throws ParsingException {
assertEquals("libux", extractor.getParentChannelName());
}
@Test
public void testParentChannelUrl() throws ParsingException {
assertEquals("https://peertube.mastodon.host/accounts/libux", extractor.getParentChannelUrl());
}
@Test
public void testAvatarUrl() throws ParsingException {
assertIsSecureUrl(extractor.getAvatarUrl());
@@ -181,6 +191,16 @@ public class PeertubeChannelExtractorTest {
assertNotNull(extractor.getDescription());
}
@Test
public void testParentChannelName() throws ParsingException {
assertEquals("booteille", extractor.getParentChannelName());
}
@Test
public void testParentChannelUrl() throws ParsingException {
assertEquals("https://peertube.mastodon.host/accounts/booteille", extractor.getParentChannelUrl());
}
@Test
public void testAvatarUrl() throws ParsingException {
assertIsSecureUrl(extractor.getAvatarUrl());