Add junit test for retrieving a resource without file extension - Fixes gh-20302
This commit is contained in:
@@ -175,6 +175,13 @@ public class ResourceControllerTests {
|
||||
assertThat(resource).isEqualToIgnoringNewLines("foo: dev_bar/spam");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resourceWithoutFileExtension() throws Exception {
|
||||
this.environmentRepository.setSearchLocations("classpath:/test");
|
||||
String resource = this.controller.retrieve("foo", "bar", "dev", "foo", true);
|
||||
assertThat(resource).isEqualToIgnoringNewLines("foo: dev_bar");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resourceWithSlash() throws Exception {
|
||||
this.environmentRepository.setSearchLocations("classpath:/test");
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
foo: dev_bar
|
||||
Reference in New Issue
Block a user