Fixtures with Active Storage

37 views
Skip to first unread message

Rolandas Barysas

unread,
Feb 27, 2018, 1:51:00 PM2/27/18
to Ruby on Rails: Talk
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

Rolandas Barysas

unread,
Mar 2, 2018, 7:35:17 AM3/2/18
to rubyonra...@googlegroups.com
For the record, I haven't found a good solution with fixtures, so I made avatars optional and uploads creating dynamically inside integration tests.
--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages