X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/87918595da1e1fad2ddd7aa62f9fc537dff657ff..8a4405dd0c3af7783d0cc9a4f864f4ee5cd0e71d:/test/helpers/application_helper_test.rb diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index d1c41d62c..89e5a3893 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -39,114 +39,12 @@ class ApplicationHelperTest < ActionView::TestCase def test_rss_link_to link = rss_link_to(:controller => :diary_entry, :action => :rss) - assert_dom_equal "", link + 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 "