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

Version Path
adminpanel-3.6.1 test/features/shared/resource/edit_test.rb
adminpanel-3.6.0 test/features/shared/resource/edit_test.rb
adminpanel-3.5.1 test/features/shared/resource/edit_test.rb
adminpanel-3.5.0 test/features/shared/resource/edit_test.rb
adminpanel-3.4.7 test/features/shared/resource/edit_test.rb
adminpanel-3.4.6 test/features/shared/resource/edit_test.rb
adminpanel-3.4.5 test/features/shared/resource/edit_test.rb
adminpanel-3.4.4 test/features/shared/resource/edit_test.rb
adminpanel-3.4.3 test/features/shared/resource/edit_test.rb
adminpanel-3.4.2 test/features/shared/resource/edit_test.rb
adminpanel-3.4.1 test/features/shared/resource/edit_test.rb
adminpanel-3.4.0 test/features/shared/resource/edit_test.rb
adminpanel-3.3.4 test/features/shared/resource/edit_test.rb
adminpanel-3.3.3 test/features/shared/resource/edit_test.rb
adminpanel-3.3.0 test/features/shared/resource/edit_test.rb
adminpanel-3.2.1 test/features/shared/resource/edit_test.rb
adminpanel-3.2.0 test/features/shared/resource/edit_test.rb
adminpanel-3.1.0 test/features/shared/resource/edit_test.rb
adminpanel-3.0.0 test/features/shared/resource/edit_test.rb