-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSA15a #89
RSA15a #89
Conversation
|
||
waitUntil(timeout: 10) { done in | ||
// Token | ||
client.calculateAuthorization(ARTAuthMethod.Token) { token, error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is calculateAuthorization
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattheworiordan It is the REST method that checks the Auth method and completes the request with the Authorisation header: Basic key
or Bearer token
. When it is Token, it calls the Auth#authorise
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name could be better. Maybe: calculateAuthorization
-> buildAuthorisationHeader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepareAuthorisationHeader
?
Looks good, however I don't think it's testing the error condition when the provided |
@mattheworiordan Could you clarify, please. Which error condition?
|
@mattheworiordan Can you please merge this or review what is missing? I need the property that I added on the MockTransport. |
As a policy, we should always be testing the success and failure conditions. In this example, you are only testing the success condition which passes i.e. Please bear this in mind in all future tests, we are always aiming to cover both success and failures for any requirement to prove it's implemented. |
Done |
Add mandatory version param for rest#request.
No description provided.