Fix broken spec

Use existing I18n translations in broken spec.
This commit is contained in:
Senén Rodero Rodríguez
2019-02-25 19:11:26 +01:00
committed by voodoorai2000
parent 95f848f021
commit 7c137faf53

View File

@@ -106,10 +106,10 @@ describe "Admin custom information texts" do
value_en: "Custom debate title",
value_es: "Título personalizado de debate")
second_key = "debates.form.debate_text"
debate_text = create(:i18n_content, key: second_key,
value_en: "Custom debate text",
value_es: "Texto personalizado de debate")
second_key = "debates.new.start_new"
page_title = create(:i18n_content, key: second_key,
value_en: "Start a new debate",
value_es: "Empezar un debate")
visit admin_site_customization_information_texts_path(tab: "debates")
@@ -121,15 +121,15 @@ describe "Admin custom information texts" do
visit admin_site_customization_information_texts_path(tab: "debates")
click_link "English"
expect(page).to have_content "Custom debate text"
expect(page).to have_content "Start a new debate"
expect(page).to have_content "Custom debate title"
debate_title.reload
debate_text.reload
page_title.reload
expect(debate_text.value_es).to be(nil)
expect(page_title.value_es).to be(nil)
expect(debate_title.value_es).to be(nil)
expect(debate_text.value_en).to eq("Custom debate text")
expect(page_title.value_en).to eq("Start a new debate")
expect(debate_title.value_en).to eq("Custom debate title")
end
end