File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2107,10 +2107,32 @@ def test_resource_merges_options_from_scope
2107
2107
end
2108
2108
end
2109
2109
2110
+ assert_equal "/account" , account_path
2110
2111
assert_raise ( NoMethodError ) { new_account_path }
2111
2112
2112
2113
get "/account/new"
2113
2114
assert_equal 404 , status
2115
+
2116
+ get "/account"
2117
+ assert_equal 200 , status
2118
+ end
2119
+
2120
+ def test_resource_merges_options_from_scope_hash
2121
+ draw do
2122
+ scope_options = { only : :show }
2123
+ scope scope_options do
2124
+ resource :account
2125
+ end
2126
+ end
2127
+
2128
+ assert_equal "/account" , account_path
2129
+ assert_raise ( NoMethodError ) { new_account_path }
2130
+
2131
+ get "/account/new"
2132
+ assert_equal 404 , status
2133
+
2134
+ get "/account"
2135
+ assert_equal 200 , status
2114
2136
end
2115
2137
2116
2138
def test_resources_merges_options_from_scope
You can’t perform that action at this time.
0 commit comments