hiscore: use correct endpoint when looking up self with shortcut

Co-authored-by: Hydrox6 <ikada@protonmail.ch>
This commit is contained in:
Adam
2021-04-13 19:20:07 -04:00
committed by Adam
parent 0914d5df90
commit 8d25132112
3 changed files with 78 additions and 37 deletions

View File

@@ -25,17 +25,22 @@
package net.runelite.client.plugins.hiscore;
import static net.runelite.client.plugins.hiscore.HiscorePanel.formatLevel;
import net.runelite.http.api.hiscore.HiscoreEndpoint;
import okhttp3.OkHttpClient;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class HiscorePanelTest
{
@Test
public void testConstructor()
{
new HiscorePanel(null, mock(HiscoreConfig.class), mock(NameAutocompleter.class), mock(OkHttpClient.class));
HiscorePlugin plugin = mock(HiscorePlugin.class);
when(plugin.getWorldEndpoint()).thenReturn(HiscoreEndpoint.NORMAL);
new HiscorePanel(null, plugin, mock(HiscoreConfig.class),
mock(NameAutocompleter.class), mock(OkHttpClient.class));
}
@Test