mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-03-24 17:09:03 +00:00
Fix a test
This commit is contained in:
parent
b929864873
commit
99cefd0844
@ -1769,6 +1769,7 @@ public class AuthorizationInterceptorDstu2Test {
|
|||||||
@Override
|
@Override
|
||||||
public List<IAuthRule> buildRuleList(RequestDetails theRequestDetails) {
|
public List<IAuthRule> buildRuleList(RequestDetails theRequestDetails) {
|
||||||
return new RuleBuilder()
|
return new RuleBuilder()
|
||||||
|
.allow().patch().allRequests().andThen()
|
||||||
.allow("Rule 1").write().instance("Patient/900").andThen()
|
.allow("Rule 1").write().instance("Patient/900").andThen()
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@ -1788,13 +1789,6 @@ public class AuthorizationInterceptorDstu2Test {
|
|||||||
assertEquals(204, status.getStatusLine().getStatusCode());
|
assertEquals(204, status.getStatusLine().getStatusCode());
|
||||||
assertTrue(ourHitMethod);
|
assertTrue(ourHitMethod);
|
||||||
|
|
||||||
ourHitMethod = false;
|
|
||||||
httpPost = new HttpPatch("http://localhost:" + ourPort + "/Patient/999");
|
|
||||||
httpPost.setEntity(new StringEntity(input, ContentType.parse("application/json-patch+json")));
|
|
||||||
status = ourClient.execute(httpPost);
|
|
||||||
response = extractResponseAndClose(status);
|
|
||||||
assertEquals(403, status.getStatusLine().getStatusCode());
|
|
||||||
assertFalse(ourHitMethod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user