fix_for_failing_redmine_api_key_test #108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @mikitex70,
during redmine test with redmine_drawio plugin installed I recognized a failing redmine test since redmine_drawio creates by
default an api key for the current user even if the api is disabled. This will happen in RedmineDrawio::ViewLayoutsBaseHtmlHeadHook when providing the hash code.
In order to fix that redmine test failure I created this pull request which provides the api key only if the api is enabled. Furthermore, it will render a warning for the administrator if the api is not enabled.
And of course, I added some tests. :)
Please let me know if there could be done something better.
Best Regards,
liaham
Update: In contrast to the first PR I fixed a wrong api check and added further tests.