File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ public class Url : Payload
311
311
private readonly string url ;
312
312
313
313
/// <summary>
314
- /// Generates a link. If not given, http/https protocol will be added.
314
+ /// Generates a link. If protocol not given, http protocol will be added.
315
315
/// </summary>
316
316
/// <param name="url">Link url target</param>
317
317
public Url ( string url )
@@ -321,7 +321,7 @@ public Url(string url)
321
321
322
322
public override string ToString ( )
323
323
{
324
- return ( ! this . url . StartsWith ( "http" ) ? "http://" + this . url : this . url ) ;
324
+ return ( ! this . url . StartsWith ( "http" , StringComparison . OrdinalIgnoreCase ) ? "http://" + this . url : this . url ) ;
325
325
}
326
326
}
327
327
Original file line number Diff line number Diff line change @@ -744,6 +744,18 @@ public void url_should_build_https()
744
744
}
745
745
746
746
747
+ [ Fact ]
748
+ [ Category ( "PayloadGenerator/Url" ) ]
749
+ public void url_should_build_https_all_caps ( )
750
+ {
751
+ var url = "HTTPS://CODE-BUDE.NET" ;
752
+
753
+ var generator = new PayloadGenerator . Url ( url ) ;
754
+
755
+ generator . ToString ( ) . ShouldBe ( "HTTPS://CODE-BUDE.NET" ) ;
756
+ }
757
+
758
+
747
759
[ Fact ]
748
760
[ Category ( "PayloadGenerator/Url" ) ]
749
761
public void url_should_add_http ( )
You can’t perform that action at this time.
0 commit comments