Merge pull request #10276 from demarches-simplifiees/fix_domain
Tech: empeche temporairement de setter le domain préféré
This commit is contained in:
commit
cbf54b84a7
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 }
|
validates :preferred_domain, inclusion: { in: User.preferred_domains.keys, allow_nil: true }
|
||||||
|
|
||||||
def update_preferred_domain(host)
|
def update_preferred_domain(host)
|
||||||
case host
|
# DIRTY FIX
|
||||||
when ApplicationHelper::APP_HOST
|
#
|
||||||
preferred_domain_demarches_gouv_fr!
|
# case host
|
||||||
when ApplicationHelper::APP_HOST_LEGACY
|
# when ApplicationHelper::APP_HOST
|
||||||
preferred_domain_demarches_simplifiees_fr!
|
# preferred_domain_demarches_gouv_fr!
|
||||||
end
|
# when ApplicationHelper::APP_HOST_LEGACY
|
||||||
|
# preferred_domain_demarches_simplifiees_fr!
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe Users::RegistrationsController, type: :controller do
|
||||||
|
|
||||||
subject
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ describe Users::SessionsController, type: :controller do
|
||||||
it 'update preferred domain' do
|
it 'update preferred domain' do
|
||||||
subject
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue