fixed peertube search test

This commit is contained in:
yausername 2019-03-23 19:11:19 +05:30
parent bd22b55885
commit 07a8129a73

View File

@ -3,10 +3,17 @@ package org.schabi.newpipe.extractor.services.peertube.search;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.schabi.newpipe.extractor.ServiceList.PeerTube; import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
public class PeertubeSearchQHTest { public class PeertubeSearchQHTest {
@BeforeClass
public static void setUpClass() throws Exception {
// setting instance might break test when running in parallel
PeerTube.setInstance("https://peertube.mastodon.host", "PeerTube on Mastodon.host");
}
@Test @Test
public void testRegularValues() throws Exception { public void testRegularValues() throws Exception {
assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=asdf", PeerTube.getSearchQHFactory().fromQuery("asdf").getUrl()); assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=asdf", PeerTube.getSearchQHFactory().fromQuery("asdf").getUrl());