diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb new file mode 100644 index 00000000..14fafe8e --- /dev/null +++ b/test/helpers/application_helper_test.rb @@ -0,0 +1,19 @@ +require "test_helper" + +class ApplicationHelperTest < ActionView::TestCase + test "#title(page_title)" do + title("Test Title") + assert_equal "Test Title", content_for(:title) + end + + test "#header_title(page_title)" do + header_title("Test Header Title") + assert_equal "Test Header Title", content_for(:header_title) + end + + test "#permitted_accountable_partial(accountable_type)" do + assert_equal "account", permitted_accountable_partial("Account") + assert_equal "user", permitted_accountable_partial("User") + assert_equal "admin_user", permitted_accountable_partial("AdminUser") + end +end