File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
include Rails . application . routes . url_helpers
6
6
7
+ let ( :resource ) { ActiveAdmin . register Category }
8
+
7
9
[ false , nil ] . each do |value |
8
10
9
11
describe "with a #{ value } default namespace" do
12
14
with_custom_default_namespace ( value ) { example . call }
13
15
end
14
16
17
+ it "should generate resource paths" do
18
+ expect ( resource . route_collection_path ) . to eq "/categories"
19
+ end
20
+
15
21
it "should generate a log out path" do
16
22
expect ( destroy_admin_user_session_path ) . to eq "/logout"
17
23
end
30
36
with_custom_default_namespace ( :test ) { example . call }
31
37
end
32
38
39
+ it "should generate resource paths" do
40
+ expect ( resource . route_collection_path ) . to eq "/test/categories"
41
+ end
42
+
33
43
it "should generate a log out path" do
34
44
expect ( destroy_admin_user_session_path ) . to eq "/test/logout"
35
45
end
You can’t perform that action at this time.
0 commit comments