Ruby on Rails Friday, March 2, 2018

For the record, I haven't found a good solution with fixtures, so I made avatars optional and uploads creating dynamically inside integration tests.


On Tue, Feb 27, 2018, at 20:50, Rolandas Barysas wrote:
Hey all,

Has anyone had any luck creating fixtures for Active Storage uploads? I wouldn't mind creating uploads in integration tests, but because my User model has_one_attached :avatar and it always has to be present, all my integration tests fail due to non-existent user avatar in my header (.variant() called on nil).

Cheers


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment