gallery
gallery copied to clipboard
Simplify getserver2serverproperties method
Fixes: No specific issue number. The commit seemed worthwhile, as I was reviewing the code.
Licence: MIT or AGPL
Description
This PR simplifies (and adds tests to) PageController::getServer2ServerProperties()
. I noticed that it could be streamlined while conducting a code audit.
Features
n/a
Screenshots or screencasts
n/a
Caveats
n/a
Tests
Added tests for:
- When a password is set and serve-to-server sharing is enabled
- When a password is not set or null and serve-to-server sharing is enabled
Tested on
- [ ] Windows/Firefox
- [ ] Android 6.1/Chrome
- [x] macOS/command-line
TODO
- [ ] Add more test data to the test's data provider method
Check list
- [X] Code is properly documented
- [X] Code is properly formatted
- [ ] Commits have been squashed
- [X] Tests (unit, integration, api and/or acceptance) are included
- [ ] Documentation (manuals or wiki) has been updated or is not required
Reviewers
@patrickjahns
@patrickjahns, would you mind reviewing this PR?