Sha256: 80bca737e896acc3c33a3c22fe8c373d3a632c8ed2ed9377b4285443768c401a
Contents?: true
Size: 879 Bytes
Versions: 19
Compression:
Stored size: 879 Bytes
Contents
require 'test_helper' class EditTest < ViewCase fixtures :all setup :visit_adminpanel_new_product_path teardown :teardown def test_submitting_with_same_information sleep 0.2 assert_button("Actualizar #{adminpanel_products(:first).name}") click_button("Actualizar #{adminpanel_products(:first).name}") assert_content( adminpanel_products(:first).name ) assert_content( adminpanel_products(:first).price ) end def test_submitting_with_invalid_information fill_in 'product_name', with: '' fill_in 'product_price', with: '' click_button("Actualizar #{adminpanel_products(:first).name}") assert_content('Producto no pudo guardarse debido a 2 errores') end protected def visit_adminpanel_new_product_path visit adminpanel.signin_path login visit adminpanel.edit_product_path(adminpanel_products(:first)) end end
Version data entries
19 entries across 19 versions & 1 rubygems