Sha256: d8a78929168b642d7803766954f1646be04b4ff2fff90a833ef82e6afe17c46b
Contents?: true
Size: 694 Bytes
Versions: 15
Compression:
Stored size: 694 Bytes
Contents
require 'test_helper' class DropzoneElementGenerationTest < ViewCase fixtures :all setup :sign_in test "rendering the form should display the dropzone element" do visit adminpanel.new_product_path assert_selector '#photo_dropzone' end test "render the form should add a hidden input for each existing photos" do product = adminpanel_products(:first) visit adminpanel.edit_product_path(product) assert product.photos.count > 0 assert_selector '#photo_dropzone' assert_selector "input[type='hidden'][name='product[photo_ids][]']", count: product.photos.count end protected def sign_in visit adminpanel.signin_path login end end
Version data entries
15 entries across 15 versions & 1 rubygems