@@ -6,12 +6,12 @@ class InstrumentationTest < IntegrationTest
66 visit "/login"
77 end
88
9- assert_match /Processing by RodauthController#login as HTML/ , logged
10- refute_match /Parameters/ , logged
9+ assert_match ( /Processing by RodauthController#login as HTML/ , logged )
10+ refute_match ( /Parameters/ , logged )
1111 if ::Rails . gem_version >= Gem ::Version . new ( "6.0" )
12- assert_match /Completed 200 OK in \d +ms \( Views: \d +ms | ActiveRecord: \d +\. \d +ms | Allocations: \d +\) / , logged
12+ assert_match ( /Completed 200 OK in \d +ms \( Views: \d +ms | ActiveRecord: \d +\. \d +ms | Allocations: \d +\) / , logged )
1313 else
14- assert_match /Completed 200 OK in \d +ms \( Views: \d +ms | ActiveRecord: \d +\. \d +ms\) / , logged
14+ assert_match ( /Completed 200 OK in \d +ms \( Views: \d +ms | ActiveRecord: \d +\. \d +ms\) / , logged )
1515 end
1616 end
1717
@@ -22,44 +22,44 @@ class InstrumentationTest < IntegrationTest
2222 { "CONTENT_TYPE" => "application/json" , "HTTP_ACCEPT" => "application/json" }
2323 end
2424
25- assert_match /Processing by ActionController::API#login as JSON/ , logged
26- assert_match /Parameters: {"login"=> "user@example\. com", "password"=> "secret"}/ , logged
27- assert_match /Completed 401 Unauthorized/ , logged
25+ assert_match ( /Processing by ActionController::API#login as JSON/ , logged )
26+ assert_match ( /Parameters: {"login" ?=> ? "user@example\. com", "password" ?=> ? "secret"}/ , logged )
27+ assert_match ( /Completed 401 Unauthorized/ , logged )
2828 end
2929
3030 test "logs redirects" do
3131 logged = capture_log do
3232 visit "/change-password"
3333 end
3434
35- assert_match /Processing by RodauthController#change_password as HTML/ , logged
36- assert_match /Redirected to \/ login/ , logged
37- assert_match /Completed 302 Found/ , logged
35+ assert_match ( /Processing by RodauthController#change_password as HTML/ , logged )
36+ assert_match ( /Redirected to \/ login/ , logged )
37+ assert_match ( /Completed 302 Found/ , logged )
3838 end
3939
4040 test "handles early response via callback" do
4141 logged = capture_log do
4242 visit "/login?early_return=true"
4343 end
4444
45- assert_match /Processing by RodauthController#login as HTML/ , logged
46- assert_match /Completed 201 Created in \d +ms/ , logged
45+ assert_match ( /Processing by RodauthController#login as HTML/ , logged )
46+ assert_match ( /Completed 201 Created in \d +ms/ , logged )
4747 end
4848
4949 test "logs response status when redirecting inside controller" do
5050 logged = capture_log do
5151 visit "/auth2"
5252 end
5353
54- assert_match /Completed 302 Found/ , logged
54+ assert_match ( /Completed 302 Found/ , logged )
5555 end
5656
5757 test "logs response status when halting inside controller" do
5858 logged = capture_log do
5959 visit "/auth_json"
6060 end
6161
62- assert_match /Completed 401 Unauthorized/ , logged
62+ assert_match ( /Completed 401 Unauthorized/ , logged )
6363 end
6464
6565 private
0 commit comments