all fields are required
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user