Skip to content

Commit

Permalink
tests: cover invalid item
Browse files Browse the repository at this point in the history
  • Loading branch information
midgleyc committed Apr 30, 2022
1 parent efe2f4f commit fd43727
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ public ItemTraceCommandTest() {
this.command = "itrace";
}

@Test
public void doesNotTraceFakeItems() {
execute("beefy nigiri");

RequestLoggerOutput.startStream();
Cleanups cleanups = Player.addItem("beefy nigiri");
try (cleanups) {
var text = RequestLoggerOutput.stopStream();
assertThat(text, not(containsString("itrace")));
}

String output = execute("");
assertThat(output, containsString("Previously watched items have been cleared"));
}

@Test
public void tracesItemsAddedToInventory() {
execute("hair spray");
Expand Down

0 comments on commit fd43727

Please sign in to comment.