File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1818 "CFzxing" :" ^1.1.0"
1919 },
2020 "devDependencies" :{
21- "testbox" :" stable "
21+ "testbox" :" ^4.0.0 "
2222 },
2323 "installPaths" :{
2424 "testbox" :" testbox/" ,
Original file line number Diff line number Diff line change @@ -77,13 +77,13 @@ component singleton accessors="true" {
7777 return arrayToList (
7878 [
7979 " otpauth://totp/" ,
80- encodeForURL ( arguments .issuer ),
80+ urlEncodedFormat ( arguments .issuer ),
8181 " :" ,
8282 arguments .email ,
8383 " ?secret=" ,
8484 arguments .secret ,
8585 " &issuer=" ,
86- encodeForURL ( arguments .issuer )
86+ urlEncodedFormat ( arguments .issuer )
8787 ],
8888 " "
8989 );
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ component extends="testbox.system.BaseSpec" {
157157 secret = secret
158158 );
159159 expect ( totpUrl ).toBe (
160- " otpauth://totp/# encodeForURL ( issuer ) #:# email # ?secret=#secret #&issuer=# encodeForURL ( issuer ) # "
160+ " otpauth://totp/Example%20Company:john@example.com ?secret=#secret #&issuer=Example%20Company "
161161 );
162162 } );
163163 } );
@@ -223,7 +223,7 @@ component extends="testbox.system.BaseSpec" {
223223 expect ( config .secret ).toMatchWithCase ( " ^[A-Z2-7]+=*$" , " Secret must be a valid Base32 string." );
224224 expect ( config ).toHaveKey ( " url" );
225225 expect ( config .url ).toBe (
226- " otpauth://totp/# encodeForURL ( issuer ) #:# email # ?secret=#config .secret #&issuer=# encodeForURL ( issuer ) # "
226+ " otpauth://totp/Example%20Company:john@example.com ?secret=#config .secret #&issuer=Example%20Company "
227227 );
228228 expect ( config ).toHaveKey ( " qrCode" );
229229 expect ( isImage ( config .qrCode ) ).toBeTrue ( " An image should have been returned" );
You can’t perform that action at this time.
0 commit comments