Sha256: 2c5869463436b6979d23e5b617b561ebbdb91aa4bfdc4a96ff9c09e1468fc242
Contents?: true
Size: 964 Bytes
Versions: 17
Compression:
Stored size: 964 Bytes
Contents
require 'test_helper' require 'adminpanel/product' require 'adminpanel/category' class BelongsToCategoryModalTest < ViewCase setup :visit_adminpanel_new_department_path teardown :teardown def test_add_remote_category_link_exist assert_link('Agregar Categoria') end def test_adding_a_remote_category_with_invalid_information trigger_modal 'Agregar Categoria' assert_equal 'Agregar Categoria', find('#modal-title').text submit_modal 'Agregar Categoria' assert_content( I18n.t('errors', model: 'Categoria', count: 1) ) end def test_adding_a_remote_category_with_valid_information trigger_modal 'Agregar Categoria' fill_in 'category_name', with: 'remote product' submit_modal 'Agregar Categoria' assert_xpath("//option[contains(text(), 'remote product' )]") end private def visit_adminpanel_new_department_path visit adminpanel.signin_path login visit adminpanel.new_department_path end end
Version data entries
17 entries across 17 versions & 1 rubygems