You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/kotlin/com/coder/toolbox/util/URLExtensionsTest.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ internal class URLExtensionsTest {
78
78
val url ="/bin/coder-linux-amd64"
79
79
val result = url.validateStrictWebUrl()
80
80
assertEquals(
81
-
WebUrlValidationResult.Invalid("$urlis relative, it must be absolute"),
81
+
WebUrlValidationResult.Invalid("The URL \"/bin/coder-linux-amd64\"is missing a scheme (like https://). Please enter a full web address like \"https://example.com\""),
82
82
result
83
83
)
84
84
}
@@ -88,7 +88,7 @@ internal class URLExtensionsTest {
WebUrlValidationResult.Invalid("$urlis opaque, instead of hierarchical"),
91
+
WebUrlValidationResult.Invalid("The URL \"mailto:[email protected]\"is invalid because it is not in the standard format. Please enter a full web address like \"https://example.com\""),
92
92
result
93
93
)
94
94
}
@@ -98,7 +98,7 @@ internal class URLExtensionsTest {
98
98
val url ="ftp://coder.com"
99
99
val result = url.validateStrictWebUrl()
100
100
assertEquals(
101
-
WebUrlValidationResult.Invalid("Scheme for $url must be either http or https"),
101
+
WebUrlValidationResult.Invalid("The URL \"ftp://coder.com\" must start with http:// or https://, not \"ftp\""),
102
102
result
103
103
)
104
104
}
@@ -108,7 +108,7 @@ internal class URLExtensionsTest {
108
108
val url ="http:///bin/coder-linux-amd64"
109
109
val result = url.validateStrictWebUrl()
110
110
assertEquals(
111
-
WebUrlValidationResult.Invalid("$urldoes not have a hostname"),
111
+
WebUrlValidationResult.Invalid("The URL \"http:///bin/coder-linux-amd64\"does not include a valid website name. Please enter a full web address like \"https://example.com\""),
112
112
result
113
113
)
114
114
}
@@ -118,7 +118,7 @@ internal class URLExtensionsTest {
118
118
val url ="http://[invalid-uri]"
119
119
val result = url.validateStrictWebUrl()
120
120
assertEquals(
121
-
WebUrlValidationResult.Invalid("Malformed IPv6 address at index 8: $url"),
121
+
WebUrlValidationResult.Invalid("The input \"http://[invalid-uri]\" is not a valid web address. Please enter a full web address like \"https://example.com\""),
122
122
result
123
123
)
124
124
}
@@ -128,7 +128,7 @@ internal class URLExtensionsTest {
128
128
val url ="http//coder.com"
129
129
val result = url.validateStrictWebUrl()
130
130
assertEquals(
131
-
WebUrlValidationResult.Invalid("http//coder.com is relative, it must be absolute"),
131
+
WebUrlValidationResult.Invalid("The URL \"http//coder.com\" is missing a scheme (like https://). Please enter a full web address like \"https://example.com\""),
132
132
result
133
133
)
134
134
}
@@ -138,7 +138,7 @@ internal class URLExtensionsTest {
138
138
val url ="http:coder.com"
139
139
val result = url.validateStrictWebUrl()
140
140
assertEquals(
141
-
WebUrlValidationResult.Invalid("http:coder.com is opaque, instead of hierarchical"),
141
+
WebUrlValidationResult.Invalid("The URL \"http:coder.com\" is invalid because it is not in the standard format. Please enter a full web address like \"https://example.com\""),
142
142
result
143
143
)
144
144
}
@@ -148,7 +148,7 @@ internal class URLExtensionsTest {
148
148
val url ="https:/coder.com"
149
149
val result = url.validateStrictWebUrl()
150
150
assertEquals(
151
-
WebUrlValidationResult.Invalid("https:/coder.com does not have a hostname"),
151
+
WebUrlValidationResult.Invalid("The URL \"https:/coder.com\" does not include a valid website name. Please enter a full web address like \"https://example.com\""),
0 commit comments