ijmdqa
Last Updated: March 01, 2018
·
639
· lucianosousa

RSpec + Carrierwave Controller test example

before do
  post :create, params: {
    produto: product.attributes.except(:id).merge(
      product_image: Rack::Test::UploadedFile.new(Rails.root.join("spec/fixtures/logo.png"))
    )
  }
end