all fields are required

This commit is contained in:
2015-10-06 09:30:35 +02:00
parent b381cbf066
commit 9bdb99fe3d
5 changed files with 18 additions and 3 deletions
+1 -2
View File
@@ -11,7 +11,6 @@ feature 'Support announcement' do
fill_in 'Postleitzahl', with: '8704'
fill_in 'Ort', with: 'Hinterm Mond'
fill_in 'E-Mail', with: 'blocher@blocher.ch'
fill_in 'E-Mail', with: 'blocher@blocher.ch'
choose 'Ich unterschreibe eine Volksinitiative für die Freigabe von Cannabis und helfe aktiv Unterschriften in meiner Umgebung zu sammeln.'
@@ -26,7 +25,7 @@ feature 'Support announcement' do
click_button 'Unterstützung zusichern'
expect(page).to have_content 'Ihre Eingabe war zu schnell.'
# Test twice just to be sure that it's not become an update action
click_button 'Unterstützung zusichern'
+6
View File
@@ -1,7 +1,13 @@
require 'rails_helper'
describe Supporter do
it { is_expected.to validate_presence_of(:first_name) }
it { is_expected.to validate_presence_of(:last_name) }
it { is_expected.to validate_presence_of(:street) }
it { is_expected.to validate_presence_of(:zip) }
it { is_expected.to validate_presence_of(:city) }
it { is_expected.to validate_presence_of(:email) }
it { is_expected.to validate_uniqueness_of(:email) }
it { is_expected.to validate_presence_of(:support) }
it { is_expected.to validate_presence_of(:age_category) }
end