adding tests and BadRequest
adding rspec