-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the constructor for BaseURL when the argument is a string (#123)
* Fix the constructor for `BaseURL` when the argument is a string * Bump the version from "2.0.0" to "2.0.1" * Fix a typo * Add more tests * Fix some mistakes * Fix the tests * Fix the tests
- Loading branch information
1 parent
c3bafc5
commit a46d92f
Showing
3 changed files
with
42 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
@test_throws Exception FHIRClient.BaseURL(HTTP.URI("http://example.com"); require_https = true) | ||
@test FHIRClient.BaseURL(HTTP.URI("http://example.com"); require_https = false) isa FHIRClient.BaseURL | ||
@test_logs (:warn,) match_mode=:any FHIRClient.BaseURL(HTTP.URI("http://example.com"); require_https = false) | ||
@testset "BaseURL constructor" begin | ||
https_uris = ["https://example.com", HTTP.URI("https://example.com")] | ||
@testset for uri in https_uris | ||
@test FHIRClient.BaseURL(uri) isa FHIRClient.BaseURL | ||
@test FHIRClient.BaseURL(uri; require_https = true) isa FHIRClient.BaseURL | ||
@test FHIRClient.BaseURL(uri; require_https = false) isa FHIRClient.BaseURL | ||
end | ||
|
||
http_uris = ["http://example.com", HTTP.URI("http://example.com")] | ||
@testset for uri in http_uris | ||
@test_throws Exception FHIRClient.BaseURL(uri) | ||
@test_throws Exception FHIRClient.BaseURL(uri; require_https = true) | ||
@test FHIRClient.BaseURL(uri; require_https = false) isa FHIRClient.BaseURL | ||
@test_logs (:warn,) match_mode=:any FHIRClient.BaseURL(uri; require_https = false) | ||
end | ||
end |
a46d92f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
a46d92f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/78700
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: