features/menu.feature in activeadmin-1.0.0.pre5 vs features/menu.feature in activeadmin-1.0.0
- old
+ new
@@ -41,13 +41,32 @@
Scenario: Adding a resource as a sub menu item
Given a configuration of:
"""
ActiveAdmin.register User
ActiveAdmin.register Post do
- menu parent: 'User'
+ menu parent: 'Users'
end
"""
When I am on the dashboard
Then I should see a menu item for "Users"
+ And I should not see a menu item for "Posts"
When I follow "Users"
Then the "Users" tab should be selected
And I should see a nested menu item for "Posts"
+
+ Scenario: Adding a resources as a sub menu items
+ Given a configuration of:
+ """
+ ActiveAdmin.register Category do
+ menu parent: 'Anything'
+ end
+ ActiveAdmin.register Post do
+ menu parent: 'Anything'
+ end
+ """
+ When I am on the dashboard
+ Then I should see a menu item for "Anything"
+ And I should not see a menu item for "Categories"
+ And I should not see a menu item for "Posts"
+ And I should see a nested menu item for "Categories"
+ And I should see a nested menu item for "Posts"
+