Don't run specs if there are custom fallbacks
This spec depends on French falling back to Spanish and was failing on forks using a different fallback.
This commit is contained in:
@@ -141,6 +141,10 @@ feature 'Admin poll questions' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "uses fallback if name is not translated to current locale", :js do
|
scenario "uses fallback if name is not translated to current locale", :js do
|
||||||
|
unless globalize_french_fallbacks.first == :es
|
||||||
|
skip("Spec only useful when French falls back to Spanish")
|
||||||
|
end
|
||||||
|
|
||||||
visit @edit_question_url
|
visit @edit_question_url
|
||||||
|
|
||||||
expect(page).to have_select('poll_question_poll_id', options: [poll.name_en])
|
expect(page).to have_select('poll_question_poll_id', options: [poll.name_en])
|
||||||
@@ -150,4 +154,8 @@ feature 'Admin poll questions' do
|
|||||||
expect(page).to have_select('poll_question_poll_id', options: [poll.name_es])
|
expect(page).to have_select('poll_question_poll_id', options: [poll.name_es])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def globalize_french_fallbacks
|
||||||
|
Globalize.fallbacks(:fr).reject { |locale| locale.match(/fr/) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user