@@ -138,12 +138,12 @@ def instance.send_two_factor_authentication_code(code)
138138
139139 it "returns uri with user's email" do
140140 expect ( instance . provisioning_uri ) .
141- to match ( %r{otpauth://totp/[email protected] \? secret=\w {16 }} ) 141+ to match ( %r{otpauth://totp/[email protected] \? secret=\w {32 }} ) 142142 end
143143
144144 it 'returns uri with issuer option' do
145145 expect ( instance . provisioning_uri ( 'houdini' ) ) .
146- to match ( %r{otpauth://totp/houdini\? secret=\w {16 }$} )
146+ to match ( %r{otpauth://totp/houdini\? secret=\w {32 }$} )
147147 end
148148
149149 it 'returns uri with issuer option' do
@@ -155,7 +155,7 @@ def instance.send_two_factor_authentication_code(code)
155155 expect ( uri . host ) . to eq ( 'totp' )
156156 expect ( uri . path ) . to eq ( '/Magic:houdini' )
157157 expect ( params [ 'issuer' ] . shift ) . to eq ( 'Magic' )
158- expect ( params [ 'secret' ] . shift ) . to match ( /\w {16 }/ )
158+ expect ( params [ 'secret' ] . shift ) . to match ( /\w {32 }/ )
159159 end
160160 end
161161 end
@@ -168,10 +168,10 @@ def instance.send_two_factor_authentication_code(code)
168168 shared_examples 'generate_totp_secret' do |klass |
169169 let ( :instance ) { klass . new }
170170
171- it 'returns a 16 character string' do
171+ it 'returns a 32 character string' do
172172 secret = instance . generate_totp_secret
173173
174- expect ( secret ) . to match ( /\w {16 }/ )
174+ expect ( secret ) . to match ( /\w {32 }/ )
175175 end
176176 end
177177
0 commit comments