-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Make path relative when adding automatically found file #3551
Conversation
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.
Haven't tested it locally, but the code looks fine and you also extended the tests. Thanks!
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.
As @lenhard, I was too lazy to test the code. Aside from a small remark concerning the test, this is good to go. You can merge directly.
when(externalFileTypes.getExternalFileTypeSelection()).thenReturn(new TreeSet<>(externalFileTypes.getDefaultExternalFileTypes())); | ||
|
||
} | ||
|
||
@Test | ||
public void test() { | ||
//Due to mocking the externalFileType class, the file extension will not be found | ||
List<LinkedFile> expected = Collections.singletonList(new LinkedFile("", file.toString(), "")); | ||
|
||
String relativeFilePath = FileUtil.shortenFileName(file, dirs).toString(); |
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.
Well, now the test uses the same logic as the method under test. Could you please hard code the expected value. It should be just CiteKey.pdf
, right?
Fixes #3476
gradle localizationUpdate
?