@@ -703,7 +703,7 @@ fn validate_redirect_url(url: &str) -> String {
703
703
#[ cfg( test) ]
704
704
mod tests {
705
705
use super :: { validate_redirect_url, AuthUrlParams , OidcLoginState } ;
706
- use actix_web:: { http :: Method , test} ;
706
+ use actix_web:: test;
707
707
use openidconnect:: { CsrfToken , Nonce } ;
708
708
709
709
#[ test]
@@ -716,9 +716,7 @@ mod tests {
716
716
717
717
#[ test]
718
718
async fn test_build_safe_redirect_url_without_query_params ( ) {
719
- let req = test:: TestRequest :: with_uri ( "/page.sql" )
720
- . method ( Method :: GET )
721
- . to_srv_request ( ) ;
719
+ let req = test:: TestRequest :: with_uri ( "/page.sql" ) . to_srv_request ( ) ;
722
720
723
721
let result = OidcLoginState :: build_safe_redirect_url ( & req) ;
724
722
assert_eq ! ( result, "/page.sql" ) ;
@@ -727,7 +725,6 @@ mod tests {
727
725
#[ test]
728
726
async fn test_build_safe_redirect_url_with_special_characters ( ) {
729
727
let req = test:: TestRequest :: with_uri ( "/page.sql?param=hello%20world&special=%26%3D" )
730
- . method ( Method :: GET )
731
728
. to_srv_request ( ) ;
732
729
733
730
let result = OidcLoginState :: build_safe_redirect_url ( & req) ;
@@ -737,9 +734,7 @@ mod tests {
737
734
#[ test]
738
735
async fn test_build_safe_redirect_url_handles_root_path ( ) {
739
736
// TestRequest with invalid relative path defaults to "/"
740
- let req = test:: TestRequest :: with_uri ( "page.sql" )
741
- . method ( Method :: GET )
742
- . to_srv_request ( ) ;
737
+ let req = test:: TestRequest :: with_uri ( "page.sql" ) . to_srv_request ( ) ;
743
738
744
739
let result = OidcLoginState :: build_safe_redirect_url ( & req) ;
745
740
// TestRequest normalizes invalid URI to root path
@@ -773,7 +768,6 @@ mod tests {
773
768
#[ test]
774
769
async fn test_oidc_login_state_preserves_query_parameters ( ) {
775
770
let req = test:: TestRequest :: with_uri ( "/dashboard.sql?user_id=123&filter=active" )
776
- . method ( Method :: GET )
777
771
. to_srv_request ( ) ;
778
772
779
773
let auth_params = AuthUrlParams {
0 commit comments