mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Prepare the spec to be factorized and to be used in different context
This commit is contained in:
committed by
Maikel Linke
parent
512cb44df5
commit
a56f061663
@@ -9,13 +9,22 @@ describe "Footer Links" do
|
||||
expect(page).to have_link "cookies policy"
|
||||
end
|
||||
|
||||
it "opens cookies policy page" do
|
||||
visit root_path
|
||||
click_link "cookies policy"
|
||||
within "div.reveal-modal" do
|
||||
expect(page).to have_content "How We Use Cookies"
|
||||
shared_examples "opens the cookie policy modal" do |content|
|
||||
it "with the right content" do
|
||||
within "div.reveal-modal" do
|
||||
expect(page).to have_content content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when english is the default language" do
|
||||
before do
|
||||
visit root_path
|
||||
click_link "cookies policy"
|
||||
end
|
||||
|
||||
it_behaves_like "opens the cookie policy modal", "How We Use Cookies"
|
||||
end
|
||||
end
|
||||
|
||||
describe "privacy policy link" do
|
||||
|
||||
Reference in New Issue
Block a user