Use lazy lookups for translations in issues
This commit is contained in:
parent
5effa0a6d6
commit
2aca6920dc
13 changed files with 89 additions and 89 deletions
|
@ -19,7 +19,7 @@ class IssuesTest < ApplicationSystemTestCase
|
|||
sign_in_as(create(:moderator_user))
|
||||
|
||||
visit issues_path
|
||||
assert page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
||||
assert page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||
end
|
||||
|
||||
def test_view_issues
|
||||
|
@ -53,19 +53,19 @@ class IssuesTest < ApplicationSystemTestCase
|
|||
visit issues_path
|
||||
fill_in "search_by_user", :with => good_user.display_name
|
||||
click_on "Search"
|
||||
assert page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
||||
assert page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||
|
||||
# User doesn't exist
|
||||
visit issues_path
|
||||
fill_in "search_by_user", :with => "Nonexistant User"
|
||||
click_on "Search"
|
||||
assert page.has_content?(I18n.t(".issues.index.user_not_found"))
|
||||
assert page.has_content?(I18n.t("issues.index.user_not_found"))
|
||||
|
||||
# Find Issue against bad_user
|
||||
visit issues_path
|
||||
fill_in "search_by_user", :with => bad_user.display_name
|
||||
click_on "Search"
|
||||
assert !page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
||||
assert !page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||
end
|
||||
|
||||
def test_commenting
|
||||
|
@ -76,7 +76,7 @@ class IssuesTest < ApplicationSystemTestCase
|
|||
|
||||
fill_in :issue_comment_body, :with => "test comment"
|
||||
click_on "Submit"
|
||||
assert page.has_content?(I18n.t(".issues.comment.comment_created"))
|
||||
assert page.has_content?(I18n.t("issue_comments.create.comment_created"))
|
||||
assert page.has_content?("test comment")
|
||||
|
||||
issue.reload
|
||||
|
@ -110,7 +110,7 @@ class IssuesTest < ApplicationSystemTestCase
|
|||
|
||||
visit issues_path
|
||||
|
||||
assert page.has_link?(I18n.t(".issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue1))
|
||||
assert page.has_link?(I18n.t(".issues.index.reports_count", :count => issue2.reports_count), :href => issue_path(issue2))
|
||||
assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue1))
|
||||
assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue2.reports_count), :href => issue_path(issue2))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,9 +21,9 @@ class ReportDiaryCommentTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("diary_entry.diary_comment.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.diary_comment.spam")
|
||||
choose I18n.t("reports.new.categories.diary_comment.spam")
|
||||
fill_in "report_details", :with => "This comment is spam"
|
||||
click_on "Create Report"
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("diary_entry.diary_entry.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.diary_entry.spam")
|
||||
choose I18n.t("reports.new.categories.diary_entry.spam")
|
||||
fill_in "report_details", :with => "This is advertising"
|
||||
click_on "Create Report"
|
||||
|
||||
|
@ -39,9 +39,9 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("diary_entry.diary_entry.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.diary_entry.spam")
|
||||
choose I18n.t("reports.new.categories.diary_entry.spam")
|
||||
fill_in "report_details", :with => "This is advertising"
|
||||
click_on "Create Report"
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ class ReportNoteTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("browse.note.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.note.spam")
|
||||
choose I18n.t("reports.new.categories.note.spam")
|
||||
fill_in "report_details", :with => "This is spam"
|
||||
click_on "Create Report"
|
||||
|
||||
|
@ -35,9 +35,9 @@ class ReportNoteTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("browse.note.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.note.spam")
|
||||
choose I18n.t("reports.new.categories.note.spam")
|
||||
fill_in "report_details", :with => "This is spam"
|
||||
click_on "Create Report"
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ class ReportUserTest < ApplicationSystemTestCase
|
|||
|
||||
click_on I18n.t("user.view.report")
|
||||
assert page.has_content? "Report"
|
||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
||||
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||
|
||||
choose I18n.t("reports.categories.user.vandal")
|
||||
choose I18n.t("reports.new.categories.user.vandal")
|
||||
fill_in "report_details", :with => "This user is a vandal"
|
||||
click_on "Create Report"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue