File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
lib/code0/identities/provider
spec/code0/identities/provider Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,8 @@ def create_identity(*)
6868 end
6969
7070 def config
71- if config_loader . is_a? ( Proc )
72- return config_loader . call
73- end
71+ return config_loader . call if config_loader . is_a? ( Proc )
72+
7473 config_loader
7574 end
7675 end
Original file line number Diff line number Diff line change 33RSpec . describe Code0 ::Identities ::Provider ::Discord do
44 subject ( :service_response ) do
55 described_class . new ( {
6- redirect_uri : redirect_uri ,
7- client_id : client_id ,
8- client_secret : client_secret
9- } ) . load_identity ( code : code )
6+ redirect_uri : redirect_uri ,
7+ client_id : client_id ,
8+ client_secret : client_secret
9+ } ) . load_identity ( code : code )
1010 end
1111
1212 let ( :redirect_uri ) { SecureRandom . hex }
6666
6767 context "when config is Proc" do
6868 subject ( :service_response ) do
69- described_class . new ( -> { {
70- redirect_uri : redirect_uri ,
71- client_id : client_id ,
72- client_secret : client_secret
73- } } ) . load_identity ( code : code )
69+ described_class . new ( lambda {
70+ {
71+ redirect_uri : redirect_uri ,
72+ client_id : client_id ,
73+ client_secret : client_secret
74+ }
75+ } ) . load_identity ( code : code )
7476 end
77+
7578 it_behaves_like "when everything is valid"
7679 end
7780
78- context ' when config is a hash' do
81+ context " when config is a hash" do
7982 it_behaves_like "when everything is valid"
8083 end
81-
82-
8384end
You can’t perform that action at this time.
0 commit comments