aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/config/url_test.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/pkg/config/url_test.go b/pkg/config/url_test.go
index d345690..492ccd8 100644
--- a/pkg/config/url_test.go
+++ b/pkg/config/url_test.go
@@ -43,8 +43,22 @@ func TestUrl_Unmarshal(t *testing.T) {
{name: "Err: Inv scheme", inp: `url: "smtp://user%40example:pass@example.net:4711/INBOX"`, wantErr: true},
{name: "Err: No Host", inp: `url: "imap://user%40example:pass/INBOX"`, wantErr: true},
{name: "Err: Scheme Only", inp: `url: "imap://"`, wantErr: true},
- {name: "Err: No Root", inp: `url: "imap://user:pass@example.net:143"`, wantErr: true},
- {name: "Err: No Root: Slash", inp: `url: "imap://user:pass@example.net:143/"`, wantErr: true},
+ {name: "No Root", inp: `url: "imap://user:pass@example.net:143"`, url: Url{
+ Scheme: "imap",
+ User: "user",
+ Password: "pass",
+ Host: "example.net",
+ Port: "143",
+ Root: "",
+ }},
+ {name: "No Root: Slash", inp: `url: "imap://user:pass@example.net:143/"`, url: Url{
+ Scheme: "imap",
+ User: "user",
+ Password: "pass",
+ Host: "example.net",
+ Port: "143",
+ Root: "/",
+ }},
{name: "Full", inp: `url:
scheme: imap
host: example.net