ninjaframework / ninja

Ninja is a full stack web framework for Java. Rock solid, fast and super productive.
http://www.ninjaframework.org
Apache License 2.0
1.91k stars 521 forks source link

"assets" folder can be located either in "resources" or "src" #730

Closed thibaultmeyer closed 2 years ago

thibaultmeyer commented 2 years ago

Resolves: #712

raphaelbauer commented 2 years ago

Nice one!

Could you think of a way to test this? Otherwise someone might remove that functionality - and nobody notices that it breaks something for users...

thibaultmeyer commented 2 years ago

I'm not sure how to unit test this change, it's a private method that uses hardcoded value "src/main" to find assets folder.

I see that at the time, you had the same problem with the existing test AssetsControllerTest::testStaticDirectoryIsFileSystemInDevMode. It only tests the case where the requested file does not exist.

@raphaelbauer

raphaelbauer commented 2 years ago

make sense..