fixed tests
fixed tests and added test for general api response
fixed rubocop issues