From 40997431072c37fb301b024cc0e3212b072ac556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Tue, 6 Feb 2024 19:51:32 -0600 Subject: [PATCH] Addd application_helper_test.rb (#302) --- test/helpers/application_helper_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/helpers/application_helper_test.rb 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