Vlad

Joined

110 Experience
1 Lesson Completed
0 Questions Solved

Activity

Posted in Testing File Uploads in Rails with Shrine Discussion

Here's how I'd system test

"""
class PhotosTest < ApplicationSystemTestCase
test "create" do
visit new_photos_url
attach_file("photos_image", "test/fixtures/files/test.png")
click_on "Create Photo"
assert_equal 'test.png', JSON.parse(Photo.last.image_data)['metadata']['filename']
end
end
"""