added tests for resources controller. at 81.21% coverage