Commit 7f96e047 authored by Alexandre Friquet's avatar Alexandre Friquet
Browse files

Fixes issue with simple quote in strings and capybara.

parent 46ab2858
......@@ -362,14 +362,15 @@ feature "Manage newsletters" do
context "as a guest" do
before do
create :menu, title: "LETTRES D'INFORMATION", uid: "newsletters"
@newsletter_title = "LETTRES INFORMATION"
create :menu, title: @newsletter_title, uid: "newsletters"
end
context "wihtout any newsletter" do
scenario "the menu does not appear" do
visit root_path
expect(page).not_to have_selector("li.menu_item", text: "LETTRES D'INFORMATION")
expect(page).not_to have_selector("li.menu_item", text: @newsletter_title)
end
end
......@@ -379,7 +380,7 @@ feature "Manage newsletters" do
scenario "the menu does not appear" do
visit root_path
expect(page).not_to have_selector("li.menu_item", text: "LETTRES D'INFORMATION")
expect(page).not_to have_selector("li.menu_item", text: @newsletter_title)
end
scenario "I cannot see it" do
......@@ -406,7 +407,7 @@ feature "Manage newsletters" do
nls = []
3.times { nls << create(:newsletter, published: true) }
visit root_path
within "li.menu_item", text: "LETTRES D'INFORMATION" do
within "li.menu_item", text: @newsletter_title do
expect(page).not_to have_selector("a", text: n1.title)
nls.each do |nl|
expect(page).to have_selector("a", text: nl.title)
......@@ -420,7 +421,7 @@ feature "Manage newsletters" do
item = create :newsletter_item
n1.items << item
visit root_path
within "li.menu_item", text: "LETTRES D'INFORMATION" do
within "li.menu_item", text: @newsletter_title do
click_link "Archives"
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment