dirty fix: avoid changing preferred domain

This commit is contained in:
simon lehericey 2024-04-05 15:15:40 +02:00
parent ce95fe1794
commit e82a8787d5
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
3 changed files with 10 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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