added tests, redirected to referrer for user-inventory edit