diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3df35e182..506ddcf8a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -632,7 +632,9 @@ def display_xml_attributes(item) raq = " » " html = [] - mappings = item.is_a?(Topic) ? item.all_field_mappings : @content_type.content_type_to_field_mappings + mappings = item.is_a?(Topic) ? item.all_field_mappings : \ + ContentType.find_by_class_name(item.class.name).content_type_to_field_mappings + content = item.extended_content_pairs mappings.each do |mapping| diff --git a/test/integration/moderation_views_test.rb b/test/integration/moderation_views_test.rb index c641ae696..ca7981dda 100644 --- a/test/integration/moderation_views_test.rb +++ b/test/integration/moderation_views_test.rb @@ -60,13 +60,13 @@ class ModerationViewsTest < ActionController::IntegrationTest add_grant_as_super_user login_as('grant') - @image = new_image do + @image = new_still_image do attach_file "image_file[uploaded_data]", \ File.join(RAILS_ROOT, "test/fixtures/files/white.jpg"), "image/jpg" end - - update_image(@image, :title => "New image updated") - update_image(@image, :title => "New image updated again") + + update_item(@image, :title => "New image updated") + update_item(@image, :title => "New image updated again") end should "have functioning moderation pages" do @@ -80,11 +80,12 @@ class ModerationViewsTest < ActionController::IntegrationTest def should_have_functioning_moderation_pages(item, controller_name, zoom_class_name) visit "/site/#{controller_name}/show/#{item.id}" - body_should_contain "New #{controller_name} updated again" + + body_should_contain "New #{controller_name.singularize} updated again" body_should_contain "History" visit "/site/#{controller_name}/history/#{item.id}" - body_should_contain "Revision History: New #{controller_name} updated again" + body_should_contain "Revision History: New #{controller_name.singularize} updated again" body_should_contain "Back to live" 1.upto(3) do |i| body_should_contain "# #{i}"