Setup I18n for titles
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user