Do a real sleep to have a real integration test otherwise travis sometimes breaks

This commit is contained in:
2016-03-29 22:19:48 +02:00
parent d509da70d3
commit 84c683bcb8
+2 -1
View File
@@ -2,7 +2,6 @@ require 'rails_helper'
feature 'Support announcement' do
scenario 'User announces support' do
allow_any_instance_of(SupportersController).to receive(:input_to_fast?).and_return(false)
visit root_path
fill_in 'Vorname', with: 'Christoph'
@@ -19,6 +18,8 @@ feature 'Support announcement' do
check 'Ich bin interessiert an einer Mitgliedschaft beim Verein Legalize it! (50 Franken pro Jahr)'
sleep 5 # Do a real sleep to have a real integration test
expect { click_button 'Unterstützung zusichern' }.to change { Supporter.count }.by(1)
supporter = Supporter.find_by(email: 'blocher@blocher.ch')
expect(supporter.coordinates).to eq [8.618589100000001, 47.2926304]