sahaya / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

.auth() does not override RestAssured.authentication #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set RestAssured.authentication to an invalid username and password
2. Override authentication by setting .auth().preemptive().basic(...) to set a 
valid username and password
3. get()

My test:

RestAssured.authentication = preemptive().basic("invalid", "password");

given()
    .auth().preemptive().basic("admin", "password")
.expect()
    .statusCode(200)
.get("/some/resource");

What is the expected output? What do you see instead?
I expect the auth values I set in my test will override the default values

What version of the product are you using? On what operating system?
RestAssured 1.8

Please provide any additional information below.
Logging shows that the Authorization header is set to the correct value, but 
that is not the value received by the server.

Original issue reported on code.google.com by plin...@gmail.com on 5 May 2013 at 4:26

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 6 May 2013 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 14 Nov 2013 at 9:08