Update polls translatable fields

The `:name` attribute is still allowed in the controller because some
forks use it when creating a poll from a budget.
This commit is contained in:
Javi Martín
2018-10-10 14:37:43 +02:00
parent f70ef3ff2f
commit 759de935ee
6 changed files with 33 additions and 17 deletions

View File

@@ -60,11 +60,11 @@ feature 'Admin polls' do
start_date = 1.week.from_now
end_date = 2.weeks.from_now
fill_in "poll_name_en", with: "Upcoming poll"
fill_in "Name", with: "Upcoming poll"
fill_in 'poll_starts_at', with: start_date.strftime("%d/%m/%Y")
fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y")
fill_in 'poll_summary_en', with: "Upcoming poll's summary. This poll..."
fill_in 'poll_description_en', with: "Upcomming poll's description. This poll..."
fill_in 'Summary', with: "Upcoming poll's summary. This poll..."
fill_in 'Description', with: "Upcomming poll's description. This poll..."
expect(page).not_to have_css("#poll_results_enabled")
expect(page).not_to have_css("#poll_stats_enabled")
@@ -88,7 +88,7 @@ feature 'Admin polls' do
expect(page).to have_css("img[alt='#{poll.image.title}']")
fill_in "poll_name_en", with: "Next Poll"
fill_in "Name", with: "Next Poll"
fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y")
click_button "Update poll"