-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #422 from atsign-foundation/expire_otp_changes
feat: Modify the OTP syntax for client to set the expire duration
- Loading branch information
Showing
5 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:at_commons/at_commons.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import 'syntax_test.dart'; | ||
|
||
void main() { | ||
group('A group of tests related to OTP verb syntax', () { | ||
test('A test to verify otp:get regex', () { | ||
Map<dynamic, dynamic> verbParams = | ||
getVerbParams(VerbSyntax.otp, "otp:get"); | ||
expect(verbParams[AtConstants.operation], "get"); | ||
expect(verbParams['ttl'], null); | ||
expect(verbParams['otp'], null); | ||
}); | ||
|
||
test('A test to verify otp:get regex with TTL', () { | ||
Map<dynamic, dynamic> verbParams = | ||
getVerbParams(VerbSyntax.otp, "otp:get:ttl:100"); | ||
expect(verbParams[AtConstants.operation], "get"); | ||
expect(verbParams['ttl'], '100'); | ||
expect(verbParams['otp'], null); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters