X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2c9c427587a7cb42136315d6c1d533d3eb058545..94a48482e0bef11bdaf11f0200b4296ee8fabf23:/test/helpers/application_helper_test.rb diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index d1c41d62c..16b1040e5 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -38,115 +38,13 @@ class ApplicationHelperTest < ActionView::TestCase end def test_rss_link_to - link = rss_link_to(:controller => :diary_entry, :action => :rss) - assert_dom_equal "", link + link = rss_link_to(:controller => :diary_entries, :action => :rss) + assert_dom_equal "", link end def test_atom_link_to - link = atom_link_to(:controller => :changeset, :action => :feed) - assert_dom_equal "", link - end - - def test_style_rules - self.current_user = nil - - css = style_rules - assert_match /\.hidden /, css - assert_match /\.hide_unless_logged_in /, css - assert_no_match /\.hide_if_logged_in /, css - assert_no_match /\.hide_if_user_/, css - assert_no_match /\.show_if_user_/, css - assert_match /\.hide_unless_administrator /, css - assert_match /\.hide_unless_moderator /, css - - self.current_user = create(:user) - - css = style_rules - assert_match /\.hidden /, css - assert_no_match /\.hide_unless_logged_in /, css - assert_match /\.hide_if_logged_in /, css - assert_match /\.hide_if_user_#{current_user.id} /, css - assert_match /\.show_if_user_#{current_user.id} /, css - assert_match /\.hide_unless_administrator /, css - assert_match /\.hide_unless_moderator /, css - - self.current_user = create(:moderator_user) - - css = style_rules - assert_match /\.hidden /, css - assert_no_match /\.hide_unless_logged_in /, css - assert_match /\.hide_if_logged_in /, css - assert_match /\.hide_if_user_#{current_user.id} /, css - assert_match /\.show_if_user_#{current_user.id} /, css - assert_match /\.hide_unless_administrator /, css - assert_no_match /\.hide_unless_moderator /, css - - self.current_user = create(:administrator_user) - - css = style_rules - assert_match /\.hidden /, css - assert_no_match /\.hide_unless_logged_in /, css - assert_match /\.hide_if_logged_in /, css - assert_match /\.hide_if_user_#{current_user.id} /, css - assert_match /\.show_if_user_#{current_user.id} /, css - assert_no_match /\.hide_unless_administrator /, css - assert_match /\.hide_unless_moderator /, css - end - - def test_if_logged_in - html = if_logged_in { "Test 1" } - assert_dom_equal "