I am trying to test my post into my API using RSpec, passing the hash params
with the parameters to be passed to my application, and the hash @env
with the authentication parameters.
I got this error I have no idea why it happened, can anyone help?
post api_v1_new_product_path, params, @env
*** REXML::ParseException Exception: #<RuntimeError: Illegal character '&' in raw string "name=Price+Checker+Product&provider_id=2357&product_category_id=2352&price=123.45&link=http%3A%2F%2Fsite.com.br%2Flink-to-product&remote_image_url=http%3A%2F%2Fsite.com.br%2Ffake_image">
My params
variable looks like:
params = { name: 'Product', provider_id: provider.id, product_category_id: category.id, price: 123.45, link: 'http://something.com/link-to-product', remote_image_url: 'http://something.com/fake_image' }