compost tracking: fix tracking fertile soil with ash covered tome

This commit is contained in:
Adam
2022-05-11 12:10:42 -04:00
parent 69a7de850b
commit 5c98c47803
2 changed files with 14 additions and 2 deletions

View File

@@ -320,4 +320,16 @@ public class CompostTrackerTest
verify(configManager).setRSProfileConfiguration("timetracking", "MOCK.compost", CompostState.SUPERCOMPOST);
}
@Test
public void onChatMessage_volcanicAsh()
{
ChatMessage chatEvent = mock(ChatMessage.class);
when(chatEvent.getType()).thenReturn(ChatMessageType.SPAM);
when(chatEvent.getMessage()).thenReturn("The fruit tree patch has been treated with ultracompost consuming 2 of your volcanic ash.");
compostTracker.pendingCompostActions.put(farmingPatch, new CompostTracker.PendingCompost(Instant.MAX, worldPoint, farmingPatch));
compostTracker.onChatMessage(chatEvent);
verify(configManager).setRSProfileConfiguration("timetracking", "MOCK.compost", CompostState.ULTRACOMPOST);
}
}