forked from antibes-dev/decidim-antibes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Quentin Champ <[email protected]>
- Loading branch information
1 parent
ef002f3
commit 11e59ad
Showing
6 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# frozen_string_literal: true | ||
|
||
# Use this hook to configure devise mailer, warden hooks and so forth. | ||
# Many of these configuration options can be set straight in your model. | ||
|
||
class RandomStalling < Devise::FailureApp | ||
def respond | ||
sleep rand * 5 | ||
super | ||
end | ||
|
||
protected | ||
|
||
def i18n_options(options) | ||
options[:locale] = session[:user_locale] | ||
super | ||
end | ||
end | ||
|
||
Devise.setup do |config| | ||
# ==> Configuration for :confirmable | ||
# A period that the user is allowed to access the website even without | ||
# confirming their account. For instance, if set to 2.days, the user will be | ||
# able to access the website for two days without confirming their account, | ||
# access will be blocked just in the third day. Default is 0.days, meaning | ||
# the user cannot access the website without confirming their account. | ||
config.allow_unconfirmed_access_for = 0.days | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
db/migrate/20220317160955_change_awesome_config_var_type.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ def fill_user_fields(user: "[email protected]", robot: false) | |
find("*[type=submit]").click | ||
end | ||
|
||
expect(page).to have_content("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 | ||
|
||
context "when user fills the form" do | ||
|
@@ -96,7 +96,7 @@ def fill_user_fields(user: "[email protected]", robot: false) | |
find("*[type=submit]").click | ||
end | ||
|
||
expect(page).to have_content("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 | ||
end | ||
end | ||
|
@@ -116,7 +116,7 @@ def fill_user_fields(user: "[email protected]", robot: false) | |
find("*[type=submit]").click | ||
end | ||
|
||
expect(page).to have_content("¡Bienvenida! Te has registrado con éxito.") | ||
expect(page).to have_content("Se ha enviado un mensaje con un enlace de confirmación a tu dirección de correo electrónico. Por favor, sigue el enlace para activar tu cuenta.") | ||
expect(last_user.locale).to eq("es") | ||
end | ||
end | ||
|
@@ -130,7 +130,7 @@ def fill_user_fields(user: "[email protected]", robot: false) | |
find("*[type=submit]").click | ||
end | ||
|
||
expect(page).not_to have_content("You have signed up successfully") | ||
expect(page).not_to have_content("A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.You have signed up successfully") | ||
end | ||
end | ||
|
||
|
@@ -579,7 +579,7 @@ def fill_user_fields(user: "[email protected]", robot: false) | |
find("*[type=submit]").click | ||
end | ||
|
||
expect(page).to have_content("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 | ||
end | ||
end | ||
|