From: Andy Allan Date: Wed, 7 Nov 2018 15:31:04 +0000 (+0100) Subject: Pluralize diary entries controller X-Git-Tag: live~3324^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/26777c44648f908b723c0c74b65972f75ac5fd3d Pluralize diary entries controller --- diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entries_controller.rb similarity index 82% rename from app/controllers/diary_entry_controller.rb rename to app/controllers/diary_entries_controller.rb index 70cb1654d..456ce99ad 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entries_controller.rb @@ -1,4 +1,4 @@ -class DiaryEntryController < ApplicationController +class DiaryEntriesController < ApplicationController layout "site", :except => :rss before_action :authorize_web @@ -12,7 +12,7 @@ class DiaryEntryController < ApplicationController before_action :allow_thirdparty_images, :only => [:new, :edit, :index, :show, :comments] def new - @title = t "diary_entry.new.title" + @title = t "diary_entries.new.title" if request.post? @diary_entry = DiaryEntry.new(entry_params) @@ -44,7 +44,7 @@ class DiaryEntryController < ApplicationController end def edit - @title = t "diary_entry.edit.title" + @title = t "diary_entries.edit.title" @diary_entry = DiaryEntry.find(params[:id]) if current_user != @diary_entry.user @@ -105,7 +105,7 @@ class DiaryEntryController < ApplicationController @user = User.active.find_by(:display_name => params[:display_name]) if @user - @title = t "diary_entry.index.user_title", :user => @user.display_name + @title = t "diary_entries.index.user_title", :user => @user.display_name @entries = @user.diary_entries else render_unknown_user params[:display_name] @@ -113,7 +113,7 @@ class DiaryEntryController < ApplicationController end elsif params[:friends] if current_user - @title = t "diary_entry.index.title_friends" + @title = t "diary_entries.index.title_friends" @entries = DiaryEntry.where(:user_id => current_user.friend_users) else require_user @@ -121,7 +121,7 @@ class DiaryEntryController < ApplicationController end elsif params[:nearby] if current_user - @title = t "diary_entry.index.title_nearby" + @title = t "diary_entries.index.title_nearby" @entries = DiaryEntry.where(:user_id => current_user.nearby) else require_user @@ -131,10 +131,10 @@ class DiaryEntryController < ApplicationController @entries = DiaryEntry.joins(:user).where(:users => { :status => %w[active confirmed] }) if params[:language] - @title = t "diary_entry.index.in_language_title", :language => Language.find(params[:language]).english_name + @title = t "diary_entries.index.in_language_title", :language => Language.find(params[:language]).english_name @entries = @entries.where(:language_code => params[:language]) else - @title = t "diary_entry.index.title" + @title = t "diary_entries.index.title" end end @@ -156,9 +156,9 @@ class DiaryEntryController < ApplicationController if user @entries = user.diary_entries - @title = t("diary_entry.feed.user.title", :user => user.display_name) - @description = t("diary_entry.feed.user.description", :user => user.display_name) - @link = url_for :controller => "diary_entry", :action => "index", :display_name => user.display_name, :host => SERVER_URL, :protocol => SERVER_PROTOCOL + @title = t("diary_entries.feed.user.title", :user => user.display_name) + @description = t("diary_entries.feed.user.description", :user => user.display_name) + @link = url_for :action => "index", :display_name => user.display_name, :host => SERVER_URL, :protocol => SERVER_PROTOCOL else head :not_found return @@ -168,13 +168,13 @@ class DiaryEntryController < ApplicationController if params[:language] @entries = @entries.where(:language_code => params[:language]) - @title = t("diary_entry.feed.language.title", :language_name => Language.find(params[:language]).english_name) - @description = t("diary_entry.feed.language.description", :language_name => Language.find(params[:language]).english_name) - @link = url_for :controller => "diary_entry", :action => "index", :language => params[:language], :host => SERVER_URL, :protocol => SERVER_PROTOCOL + @title = t("diary_entries.feed.language.title", :language_name => Language.find(params[:language]).english_name) + @description = t("diary_entries.feed.language.description", :language_name => Language.find(params[:language]).english_name) + @link = url_for :action => "index", :language => params[:language], :host => SERVER_URL, :protocol => SERVER_PROTOCOL else - @title = t("diary_entry.feed.all.title") - @description = t("diary_entry.feed.all.description") - @link = url_for :controller => "diary_entry", :action => "index", :host => SERVER_URL, :protocol => SERVER_PROTOCOL + @title = t("diary_entries.feed.all.title") + @description = t("diary_entries.feed.all.description") + @link = url_for :action => "index", :host => SERVER_URL, :protocol => SERVER_PROTOCOL end end @@ -184,9 +184,9 @@ class DiaryEntryController < ApplicationController def show @entry = @user.diary_entries.visible.where(:id => params[:id]).first if @entry - @title = t "diary_entry.show.title", :user => params[:display_name], :title => @entry.title + @title = t "diary_entries.show.title", :user => params[:display_name], :title => @entry.title else - @title = t "diary_entry.no_such_entry.title", :id => params[:id] + @title = t "diary_entries.no_such_entry.title", :id => params[:id] render :action => "no_such_entry", :status => :not_found end end diff --git a/app/views/diary_entry/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb similarity index 100% rename from app/views/diary_entry/_diary_comment.html.erb rename to app/views/diary_entries/_diary_comment.html.erb diff --git a/app/views/diary_entry/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb similarity index 95% rename from app/views/diary_entry/_diary_entry.html.erb rename to app/views/diary_entries/_diary_entry.html.erb index ec2f22601..e41eeae66 100644 --- a/app/views/diary_entry/_diary_entry.html.erb +++ b/app/views/diary_entries/_diary_entry.html.erb @@ -7,7 +7,7 @@

<%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %>

- <%= raw(t '.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'index', :display_name => nil, :language => diary_entry.language_code)) %> + <%= raw(t '.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entries', :action => 'index', :display_name => nil, :language => diary_entry.language_code)) %> diff --git a/app/views/diary_entry/_diary_index_entry.html.erb b/app/views/diary_entries/_diary_index_entry.html.erb similarity index 100% rename from app/views/diary_entry/_diary_index_entry.html.erb rename to app/views/diary_entries/_diary_index_entry.html.erb diff --git a/app/views/diary_entry/_location.html.erb b/app/views/diary_entries/_location.html.erb similarity index 100% rename from app/views/diary_entry/_location.html.erb rename to app/views/diary_entries/_location.html.erb diff --git a/app/views/diary_entry/comments.html.erb b/app/views/diary_entries/comments.html.erb similarity index 100% rename from app/views/diary_entry/comments.html.erb rename to app/views/diary_entries/comments.html.erb diff --git a/app/views/diary_entry/edit.html.erb b/app/views/diary_entries/edit.html.erb similarity index 96% rename from app/views/diary_entry/edit.html.erb rename to app/views/diary_entries/edit.html.erb index d408938e5..b46dadf1c 100644 --- a/app/views/diary_entry/edit.html.erb +++ b/app/views/diary_entries/edit.html.erb @@ -43,7 +43,7 @@ <% if action_name == 'new' %> - <%= submit_tag t('diary_entry.new.publish_button') %> + <%= submit_tag t('diary_entries.new.publish_button') %> <% else %> <%= submit_tag t('.save_button') %> <% end %> diff --git a/app/views/diary_entry/index.html.erb b/app/views/diary_entries/index.html.erb similarity index 87% rename from app/views/diary_entry/index.html.erb rename to app/views/diary_entries/index.html.erb index 021cb2058..63a805b3c 100644 --- a/app/views/diary_entry/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -13,13 +13,13 @@ <% if @user %> <% if @user == current_user %>
-
  • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('.new_title')} %>
  • +
  • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), diary_new_path, {:title => t('.new_title')} %>
  • <% end %> <% else %> <% if current_user %>
    -
  • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('.new_title')} %>
  • +
  • <%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), diary_new_path, {:title => t('.new_title')} %>
  • <% end %> <% end %> diff --git a/app/views/diary_entry/no_such_entry.html.erb b/app/views/diary_entries/no_such_entry.html.erb similarity index 100% rename from app/views/diary_entry/no_such_entry.html.erb rename to app/views/diary_entries/no_such_entry.html.erb diff --git a/app/views/diary_entry/rss.rss.builder b/app/views/diary_entries/rss.rss.builder similarity index 100% rename from app/views/diary_entry/rss.rss.builder rename to app/views/diary_entries/rss.rss.builder diff --git a/app/views/diary_entry/show.html.erb b/app/views/diary_entries/show.html.erb similarity index 100% rename from app/views/diary_entry/show.html.erb rename to app/views/diary_entries/show.html.erb diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 7aa3abd27..c7a41b687 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -18,11 +18,11 @@ <%= number_with_delimiter(current_user.traces.size) %>
  • - <%= link_to t('.my diary'), :controller => 'diary_entry', :action => 'index', :display_name => current_user.display_name %> + <%= link_to t('.my diary'), :controller => 'diary_entries', :action => 'index', :display_name => current_user.display_name %> <%= number_with_delimiter(current_user.diary_entries.size) %>
  • - <%= link_to t('.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => current_user.display_name %> + <%= link_to t('.my comments' ), :controller => 'diary_entries', :action => 'comments', :display_name => current_user.display_name %>
  • <%= link_to t('.my settings'), :controller => 'users', :action => 'account', :display_name => current_user.display_name %> @@ -66,11 +66,11 @@ <%= link_to t('.send message'), new_message_path(@user) %>
  • - <%= link_to t('.diary'), :controller => 'diary_entry', :action => 'index', :display_name => @user.display_name %> + <%= link_to t('.diary'), :controller => 'diary_entries', :action => 'index', :display_name => @user.display_name %> <%= number_with_delimiter(@user.diary_entries.size) %>
  • - <%= link_to t('.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @user.display_name %> + <%= link_to t('.comments'), :controller => 'diary_entries', :action => 'comments', :display_name => @user.display_name %>
  • <% if current_user and current_user.is_friends_with?(@user) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index a9370018a..d0b574a09 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -249,7 +249,7 @@ en: commented_at_html: "Updated %{when} ago" commented_at_by_html: "Updated %{when} ago by %{user}" full: Full discussion - diary_entry: + diary_entries: new: title: New Diary Entry publish_button: "Publish" diff --git a/config/routes.rb b/config/routes.rb index 71fcfd57d..1f25a62c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -214,24 +214,24 @@ OpenStreetMap::Application.routes.draw do post "/trace/:id/delete" => "traces#delete", :id => /\d+/ # diary pages - match "/diary/new" => "diary_entry#new", :via => [:get, :post] - get "/diary/friends" => "diary_entry#index", :friends => true, :as => "friend_diaries" - get "/diary/nearby" => "diary_entry#index", :nearby => true, :as => "nearby_diaries" - get "/user/:display_name/diary/rss" => "diary_entry#rss", :defaults => { :format => :rss } - get "/diary/:language/rss" => "diary_entry#rss", :defaults => { :format => :rss } - get "/diary/rss" => "diary_entry#rss", :defaults => { :format => :rss } - get "/user/:display_name/diary/comments/:page" => "diary_entry#comments", :page => /[1-9][0-9]*/ - get "/user/:display_name/diary/comments/" => "diary_entry#comments" - get "/user/:display_name/diary" => "diary_entry#index" - get "/diary/:language" => "diary_entry#index" - get "/diary" => "diary_entry#index" - get "/user/:display_name/diary/:id" => "diary_entry#show", :id => /\d+/, :as => :diary_entry - post "/user/:display_name/diary/:id/newcomment" => "diary_entry#comment", :id => /\d+/ - match "/user/:display_name/diary/:id/edit" => "diary_entry#edit", :via => [:get, :post], :id => /\d+/ - post "/user/:display_name/diary/:id/hide" => "diary_entry#hide", :id => /\d+/, :as => :hide_diary_entry - post "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entry#hidecomment", :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment - post "/user/:display_name/diary/:id/subscribe" => "diary_entry#subscribe", :as => :diary_entry_subscribe, :id => /\d+/ - post "/user/:display_name/diary/:id/unsubscribe" => "diary_entry#unsubscribe", :as => :diary_entry_unsubscribe, :id => /\d+/ + match "/diary/new" => "diary_entries#new", :via => [:get, :post] + get "/diary/friends" => "diary_entries#index", :friends => true, :as => "friend_diaries" + get "/diary/nearby" => "diary_entries#index", :nearby => true, :as => "nearby_diaries" + get "/user/:display_name/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } + get "/diary/:language/rss" => "diary_entries#rss", :defaults => { :format => :rss } + get "/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } + get "/user/:display_name/diary/comments/:page" => "diary_entries#comments", :page => /[1-9][0-9]*/ + get "/user/:display_name/diary/comments/" => "diary_entries#comments" + get "/user/:display_name/diary" => "diary_entries#index" + get "/diary/:language" => "diary_entries#index" + get "/diary" => "diary_entries#index" + get "/user/:display_name/diary/:id" => "diary_entries#show", :id => /\d+/, :as => :diary_entry + post "/user/:display_name/diary/:id/newcomment" => "diary_entries#comment", :id => /\d+/ + match "/user/:display_name/diary/:id/edit" => "diary_entries#edit", :via => [:get, :post], :id => /\d+/ + post "/user/:display_name/diary/:id/hide" => "diary_entries#hide", :id => /\d+/, :as => :hide_diary_entry + post "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entries#hidecomment", :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment + post "/user/:display_name/diary/:id/subscribe" => "diary_entries#subscribe", :as => :diary_entry_subscribe, :id => /\d+/ + post "/user/:display_name/diary/:id/unsubscribe" => "diary_entries#unsubscribe", :as => :diary_entry_unsubscribe, :id => /\d+/ # user pages get "/user/:display_name" => "users#show", :as => "user" diff --git a/test/controllers/diary_entry_controller_test.rb b/test/controllers/diary_entries_controller_test.rb similarity index 94% rename from test/controllers/diary_entry_controller_test.rb rename to test/controllers/diary_entries_controller_test.rb index cec225047..426bc3851 100644 --- a/test/controllers/diary_entry_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -1,6 +1,6 @@ require "test_helper" -class DiaryEntryControllerTest < ActionController::TestCase +class DiaryEntriesControllerTest < ActionController::TestCase include ActionView::Helpers::NumberHelper def setup @@ -16,86 +16,86 @@ class DiaryEntryControllerTest < ActionController::TestCase def test_routes assert_routing( { :path => "/diary", :method => :get }, - { :controller => "diary_entry", :action => "index" } + { :controller => "diary_entries", :action => "index" } ) assert_routing( { :path => "/diary/language", :method => :get }, - { :controller => "diary_entry", :action => "index", :language => "language" } + { :controller => "diary_entries", :action => "index", :language => "language" } ) assert_routing( { :path => "/user/username/diary", :method => :get }, - { :controller => "diary_entry", :action => "index", :display_name => "username" } + { :controller => "diary_entries", :action => "index", :display_name => "username" } ) assert_routing( { :path => "/diary/friends", :method => :get }, - { :controller => "diary_entry", :action => "index", :friends => true } + { :controller => "diary_entries", :action => "index", :friends => true } ) assert_routing( { :path => "/diary/nearby", :method => :get }, - { :controller => "diary_entry", :action => "index", :nearby => true } + { :controller => "diary_entries", :action => "index", :nearby => true } ) assert_routing( { :path => "/diary/rss", :method => :get }, - { :controller => "diary_entry", :action => "rss", :format => :rss } + { :controller => "diary_entries", :action => "rss", :format => :rss } ) assert_routing( { :path => "/diary/language/rss", :method => :get }, - { :controller => "diary_entry", :action => "rss", :language => "language", :format => :rss } + { :controller => "diary_entries", :action => "rss", :language => "language", :format => :rss } ) assert_routing( { :path => "/user/username/diary/rss", :method => :get }, - { :controller => "diary_entry", :action => "rss", :display_name => "username", :format => :rss } + { :controller => "diary_entries", :action => "rss", :display_name => "username", :format => :rss } ) assert_routing( { :path => "/user/username/diary/comments", :method => :get }, - { :controller => "diary_entry", :action => "comments", :display_name => "username" } + { :controller => "diary_entries", :action => "comments", :display_name => "username" } ) assert_routing( { :path => "/user/username/diary/comments/1", :method => :get }, - { :controller => "diary_entry", :action => "comments", :display_name => "username", :page => "1" } + { :controller => "diary_entries", :action => "comments", :display_name => "username", :page => "1" } ) assert_routing( { :path => "/diary/new", :method => :get }, - { :controller => "diary_entry", :action => "new" } + { :controller => "diary_entries", :action => "new" } ) assert_routing( { :path => "/diary/new", :method => :post }, - { :controller => "diary_entry", :action => "new" } + { :controller => "diary_entries", :action => "new" } ) assert_routing( { :path => "/user/username/diary/1", :method => :get }, - { :controller => "diary_entry", :action => "show", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "show", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/edit", :method => :get }, - { :controller => "diary_entry", :action => "edit", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "edit", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/edit", :method => :post }, - { :controller => "diary_entry", :action => "edit", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "edit", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/newcomment", :method => :post }, - { :controller => "diary_entry", :action => "comment", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "comment", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/hide", :method => :post }, - { :controller => "diary_entry", :action => "hide", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "hide", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/hidecomment/2", :method => :post }, - { :controller => "diary_entry", :action => "hidecomment", :display_name => "username", :id => "1", :comment => "2" } + { :controller => "diary_entries", :action => "hidecomment", :display_name => "username", :id => "1", :comment => "2" } ) assert_routing( { :path => "/user/username/diary/1/subscribe", :method => :post }, - { :controller => "diary_entry", :action => "subscribe", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "subscribe", :display_name => "username", :id => "1" } ) assert_routing( { :path => "/user/username/diary/1/unsubscribe", :method => :post }, - { :controller => "diary_entry", :action => "unsubscribe", :display_name => "username", :id => "1" } + { :controller => "diary_entries", :action => "unsubscribe", :display_name => "username", :id => "1" } ) end @@ -316,7 +316,7 @@ class DiaryEntryControllerTest < ActionController::TestCase :params => { :display_name => entry.user.display_name, :id => entry.id }, :session => { :user => entry.user } assert_response :success - assert_template "diary_entry/show" + assert_template "show" assert_select "title", :text => /Users' diaries | /, :count => 1 assert_select "div.content-heading", :count => 1 do assert_select "h2", :text => /#{entry.user.display_name}'s diary/, :count => 1 @@ -337,7 +337,7 @@ class DiaryEntryControllerTest < ActionController::TestCase :params => { :display_name => entry.user.display_name, :id => entry.id }, :session => { :user => create(:user) } assert_response :success - assert_template "diary_entry/show" + assert_template "show" assert_select "title", :text => /Users' diaries | /, :count => 1 assert_select "div.content-heading", :count => 1 do assert_select "h2", :text => /#{entry.user.display_name}'s diary/, :count => 1 diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 89e5a3893..050fa0e9f 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -38,7 +38,7 @@ class ApplicationHelperTest < ActionView::TestCase end def test_rss_link_to - link = rss_link_to(:controller => :diary_entry, :action => :rss) + link = rss_link_to(:controller => :diary_entries, :action => :rss) assert_dom_equal "", link end diff --git a/test/integration/user_diaries_test.rb b/test/integration/user_diaries_test.rb index 57b4a8b0c..026028d5f 100644 --- a/test/integration/user_diaries_test.rb +++ b/test/integration/user_diaries_test.rb @@ -29,7 +29,7 @@ class UserDiariesTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success - assert_template "diary_entry/edit" + assert_template "diary_entries/edit" # print @response.body # print @html_document.to_yaml diff --git a/test/system/report_diary_comment_test.rb b/test/system/report_diary_comment_test.rb index 18be7e649..61879a32f 100644 --- a/test/system/report_diary_comment_test.rb +++ b/test/system/report_diary_comment_test.rb @@ -11,7 +11,7 @@ class ReportDiaryCommentTest < ApplicationSystemTestCase visit diary_entry_path(@diary_entry.user.display_name, @diary_entry) assert page.has_content?(@comment.body) - assert_not page.has_content?(I18n.t("diary_entry.diary_comment.report")) + assert_not page.has_content?(I18n.t("diary_entries.diary_comment.report")) end def test_it_works @@ -19,7 +19,7 @@ class ReportDiaryCommentTest < ApplicationSystemTestCase visit diary_entry_path(@diary_entry.user.display_name, @diary_entry) assert page.has_content? @diary_entry.title - click_on I18n.t("diary_entry.diary_comment.report") + click_on I18n.t("diary_entries.diary_comment.report") assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") diff --git a/test/system/report_diary_entry_test.rb b/test/system/report_diary_entry_test.rb index 1db733ab7..9d232f8d4 100644 --- a/test/system/report_diary_entry_test.rb +++ b/test/system/report_diary_entry_test.rb @@ -10,7 +10,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase visit diary_entry_path(@diary_entry.user.display_name, @diary_entry) assert page.has_content?(@diary_entry.title) - assert_not page.has_content?(I18n.t("diary_entry.diary_entry.report")) + assert_not page.has_content?(I18n.t("diary_entries.diary_entry.report")) end def test_it_works @@ -18,7 +18,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase visit diary_entry_path(@diary_entry.user.display_name, @diary_entry) assert page.has_content? @diary_entry.title - click_on I18n.t("diary_entry.diary_entry.report") + click_on I18n.t("diary_entries.diary_entry.report") assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") @@ -42,7 +42,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase visit diary_entry_path(@diary_entry.user.display_name, @diary_entry) assert page.has_content? @diary_entry.title - click_on I18n.t("diary_entry.diary_entry.report") + click_on I18n.t("diary_entries.diary_entry.report") assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro")