dirty fix: avoid changing preferred domain
This commit is contained in:
parent
ce95fe1794
commit
e82a8787d5
3 changed files with 10 additions and 8 deletions
|
@ -7,12 +7,14 @@ module DomainMigratableConcern
|
|||
validates :preferred_domain, inclusion: { in: User.preferred_domains.keys, allow_nil: true }
|
||||
|
||||
def update_preferred_domain(host)
|
||||
case host
|
||||
when ApplicationHelper::APP_HOST
|
||||
preferred_domain_demarches_gouv_fr!
|
||||
when ApplicationHelper::APP_HOST_LEGACY
|
||||
preferred_domain_demarches_simplifiees_fr!
|
||||
end
|
||||
# DIRTY FIX
|
||||
#
|
||||
# case host
|
||||
# when ApplicationHelper::APP_HOST
|
||||
# preferred_domain_demarches_gouv_fr!
|
||||
# when ApplicationHelper::APP_HOST_LEGACY
|
||||
# preferred_domain_demarches_simplifiees_fr!
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ describe Users::RegistrationsController, type: :controller do
|
|||
|
||||
subject
|
||||
|
||||
expect(User.last.preferred_domain_demarches_gouv_fr?).to be_truthy
|
||||
# expect(User.last.preferred_domain_demarches_gouv_fr?).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ describe Users::SessionsController, type: :controller do
|
|||
it 'update preferred domain' do
|
||||
subject
|
||||
|
||||
expect(user.reload.preferred_domain_demarches_gouv_fr?).to be_truthy
|
||||
# expect(user.reload.preferred_domain_demarches_gouv_fr?).to be_truthy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue