3
3
require "abstract_unit"
4
4
5
5
class AllowBrowserController < ActionController ::Base
6
- allow_browser versions : { safari : "16.4" , chrome : "119" , firefox : "123" , opera : "104 " , ie : false } , block : -> { head :upgrade_required } , only : :hello
6
+ allow_browser versions : { safari : "16.4" , chrome : "119" , firefox : "123" , opera : "106 " , ie : false } , block : -> { head :upgrade_required } , only : :hello
7
7
def hello
8
8
head :ok
9
9
end
@@ -22,7 +22,7 @@ class AllowBrowserTest < ActionController::TestCase
22
22
SAFARI_17_2_0 = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.0 Safari/605.1.15"
23
23
FIREFOX_114 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0"
24
24
IE_11 = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
25
- OPERA_104 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95 .0.4638.69 Safari/537.36 OPR/104 .0.4638.54 "
25
+ OPERA_106 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120 .0.0.0 Safari/537.36 OPR/106 .0.0.0 "
26
26
27
27
test "blocked browser below version limit" do
28
28
get_with_agent :hello , FIREFOX_114
@@ -41,7 +41,7 @@ class AllowBrowserTest < ActionController::TestCase
41
41
get_with_agent :hello , CHROME_120
42
42
assert_response :ok
43
43
44
- get_with_agent :hello , OPERA_104
44
+ get_with_agent :hello , OPERA_106
45
45
assert_response :ok
46
46
end
47
47
@@ -55,7 +55,7 @@ class AllowBrowserTest < ActionController::TestCase
55
55
get_with_agent :modern , CHROME_120
56
56
assert_response :ok
57
57
58
- get_with_agent :modern , OPERA_104
58
+ get_with_agent :modern , OPERA_106
59
59
assert_response :ok
60
60
end
61
61
0 commit comments