Sha256: bcaf1feb1fa104f9489c60d620ab435102138fc52ed154f70a87e2710cdeab29
Contents?: true
Size: 942 Bytes
Versions: 6
Compression:
Stored size: 942 Bytes
Contents
require 'test_helper' require 'adminpanel/product' require 'adminpanel/category' require 'adminpanel/test_object' class CategoriesIndexTest < ViewCase setup :visit_adminpanel_categories_path teardown :teardown def test_adding_invalid_category assert_link('Crear Categoria para test_object') trigger_modal('Crear Categoria para test_object') 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_valid_category trigger_modal('Crear Categoria para test_object') fill_in 'category_name', with: 'categories index name' submit_modal 'Agregar Categoria' assert_xpath("//a[contains(text(), 'categories index name' )]") end private def visit_adminpanel_categories_path visit adminpanel.signin_path login visit adminpanel.categories_path end end
Version data entries
6 entries across 6 versions & 1 rubygems