Setup I18n for titles
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 26s

This commit is contained in:
sto
2025-03-27 12:15:27 +01:00
parent 26b8064553
commit 497768610d
10 changed files with 51 additions and 37 deletions

View File

@@ -18,7 +18,7 @@ RSpec.feature "Users", type: :feature do
it "should not be able to see the user list" do
visit users_path
expect(page).not_to have_content("All users")
expect(page).not_to have_content(I18n.t("users.index.title"))
end
it "should be able to create a new contest" do
@@ -26,16 +26,16 @@ RSpec.feature "Users", type: :feature do
click_link "Create a new contest"
expect(page).to have_content("New jigsaw puzzle competition")
expect(page).to have_content(I18n.t("contests.new.title"))
end
it "should be able to open an existing contest" do
visit root_path
expect(page).to have_content(contest.name)
find("div.card", text: contest.name).find("a").click()
find("div.card", text: contest.name).find("a").click
expect(page).to have_content("Edit contest")
expect(page).to have_content(I18n.t("contests.show.title", name: contest.name))
end
end
@@ -56,7 +56,7 @@ RSpec.feature "Users", type: :feature do
it "should be able to see the user list" do
visit users_path
expect(page).to have_content("All users")
expect(page).to have_content(I18n.t("users.index.title"))
expect(page).to have_content(user.username)
end
end