mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-12-27 03:17:47 +01:00
Fix tests for creative user inventory challenge completion
This commit is contained in:
parent
8a8124f36e
commit
fe9e63f1c7
4
pom.xml
4
pom.xml
@ -35,7 +35,7 @@
|
||||
<java.version>17</java.version>
|
||||
<powermock.version>2.0.9</powermock.version>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<spigot.version>1.20.1-R0.1-SNAPSHOT</spigot.version>
|
||||
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
|
||||
<spigot-annotations.version>1.2.3-SNAPSHOT</spigot-annotations.version>
|
||||
<bentobox.version>2.0.0-SNAPSHOT</bentobox.version>
|
||||
<level.version>2.6.3</level.version>
|
||||
@ -369,6 +369,8 @@
|
||||
<!-- This is required to prevent Jacoco from adding
|
||||
synthetic fields to a JavaBean class (causes errors in testing) -->
|
||||
<exclude>**/*Names*</exclude>
|
||||
<!-- Prevents the Material is too large to mock error -->
|
||||
<exclude>org/bukkit/Material*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
@ -499,7 +499,9 @@ public class TryToCompleteTest {
|
||||
public void testCompleteChallengesAddonUserChallengeWorldStringStringSuccessCreative() {
|
||||
when(player.getGameMode()).thenReturn(GameMode.CREATIVE);
|
||||
assertTrue(TryToComplete.complete(addon, user, challenge, world, topLabel, permissionPrefix));
|
||||
verify(user).getTranslation(any(World.class), eq("challenges.messages.you-completed-challenge"), eq("[value]"),eq("name"));
|
||||
// Creative players automatically complete inventory challenges twice - they have infinite inventory
|
||||
verify(user).getTranslation(world, "challenges.messages.you-repeated-challenge-multiple", "[value]", "name",
|
||||
"[count]", "2");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user