[bis] force login_with_france_connect at false when connection devise user

This commit is contained in:
Xavier J 2015-10-07 14:19:16 +02:00
parent 35ef473f59
commit 9c6b9d408b
4 changed files with 11 additions and 14 deletions

View file

@ -6,10 +6,13 @@ class Users::SessionsController < Devise::SessionsController
# super
# end
# POST /resource/sign_in
# def create
# super
# end
#POST /resource/sign_in
def create
super
current_user.login_with_france_connect = false
current_user.save
end
# DELETE /resource/sign_out
# def destroy

View file

@ -8,15 +8,11 @@ Rails.application.routes.draw do
sessions: 'gestionnaires/sessions'
}, skip: [:password, :registrations]
root 'users/dossiers#index'
# root 'users/france_connect_callbacks#login'
get 'france_connect' => 'france_connect#login'
get 'france_connect/callback' => 'france_connect#callback'
namespace :users do
get 'siret' => 'siret#index'

View file

@ -35,7 +35,6 @@ describe FranceConnectController, type: :controller do
end
it 'redirect to dossiers list' do
get :callback, code: code
expect(response).to redirect_to(controller: 'users/dossiers', action: :index)
end
end

View file

@ -1,7 +1,6 @@
require 'spec_helper'
describe FranceConnectService do
describe '.retrieve_user_informations' do
let(:code) { 'plop' }