diff --git a/config/environments/test.rb b/config/environments/test.rb index 1c19f08b2..34034499f 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -30,6 +30,10 @@ Rails.application.configure do # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + config.action_mailer.default_url_options = { + host: 'test' + } + config.action_mailer.asset_host = 'http://madrid.test' # Randomize the order test cases are executed. config.active_support.test_order = :random diff --git a/spec/factories.rb b/spec/factories.rb index 9e9ab2d0a..65315a112 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -5,6 +5,7 @@ FactoryGirl.define do last_name 'Carmena' sequence(:email) { |n| "manuela#{n}@madrid.es" } password 'judgmentday' + confirmed_at { Time.now } end factory :debate do @@ -19,7 +20,7 @@ FactoryGirl.define do association :voter, factory: :user vote_flag true end - + factory :comment do commentable user diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb index 2d972e87f..92f30ea91 100644 --- a/spec/features/users_spec.rb +++ b/spec/features/users_spec.rb @@ -14,7 +14,7 @@ feature 'Users' do click_button 'Sign up' - expect(page).to have_content 'Welcome! You have signed up successfully.' + expect(page).to have_content "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." end scenario 'Sign in' do