Skip to content

Commit

Permalink
[hotfix] Harden JarDeleteHandlerTest test
Browse files Browse the repository at this point in the history
  • Loading branch information
kl0u committed Jul 8, 2020
1 parent 78b00f6 commit a720cf5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

/**
* Unit tests for {@link JarDeleteHandler}.
Expand Down Expand Up @@ -105,7 +106,9 @@ public void testDeleteUnknownJar() throws Exception {
final RestHandlerException restHandlerException = (RestHandlerException) throwable;
assertThat(restHandlerException.getMessage(), containsString("File doesnotexist.jar does not exist in"));
assertThat(restHandlerException.getHttpResponseStatus(), equalTo(HttpResponseStatus.BAD_REQUEST));
return;
}
fail("The test should have failed by now.");
}

@Test
Expand Down

0 comments on commit a720cf5

Please sign in to comment.