Add tests for resource().

Still need a few more for the various connected routes.