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+unsubscr...@googlegroups.com.>  To post to 
> this group, send email to rubyonrails-
>  t...@googlegroups.com.>  To view this discussion on the web visit
>  
> https://groups.google.com/d/msgid/rubyonrails-talk/1519757411.1197315.1285423560.35EDD74F%40webmail.messagingengine.com[1].>
>   For more options, visit https://groups.google.com/d/optout.


Links:

  1. 
https://groups.google.com/d/msgid/rubyonrails-talk/1519757411.1197315.1285423560.35EDD74F%40webmail.messagingengine.com?utm_medium=email&utm_source=footer

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/1519994060.2981416.1289042680.7C75B2DD%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to