mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-06 13:28:48 +00:00
PassWebService use punycode converted webServiceURL + test
This commit is contained in:
parent
7578dc7352
commit
f283e4251a
3 changed files with 29 additions and 1 deletions
|
@ -126,4 +126,28 @@ void main() {
|
|||
expect(scaled, 'logo@4x.png');
|
||||
});
|
||||
});
|
||||
|
||||
test('Check Punyc encoding of Domain in Webservice', () {
|
||||
// per default Uri.parse does not punycode!
|
||||
final url = "https://my-äöü-domain.com/endpoint/1234/";
|
||||
final token = "0000000000000000";
|
||||
final webService =
|
||||
PassWebService.maybe(webServiceURL: url, authenticationToken: token);
|
||||
|
||||
expect(
|
||||
webService!.webServiceURL,
|
||||
Uri.parse("https://xn--my--domain-s5a0tyc.com/endpoint/1234"),
|
||||
);
|
||||
});
|
||||
test('Double Check Domain not needed Puny encoding in Webservice', () {
|
||||
final url = "https://my-domain.com/endpoint/1234/";
|
||||
final token = "0000000000000000";
|
||||
final webService =
|
||||
PassWebService.maybe(webServiceURL: url, authenticationToken: token);
|
||||
|
||||
expect(
|
||||
webService!.webServiceURL,
|
||||
Uri.parse("https://my-domain.com/endpoint/1234"),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue