forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registering_resources.feature
33 lines (29 loc) · 929 Bytes
/
registering_resources.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Feature: Registering Resources
Registering resources within Active Admin
Background:
Given I am logged in
And a post with the title "Hello World" exists
Scenario: Registering a resource with the defaults
Given a configuration of:
"""
ActiveAdmin.register Post
"""
When I go to the dashboard
Then I should see "Posts"
When I follow "Posts"
Then I should see "Hello World"
When I follow "View"
Then I should see "Hello World"
And I should be in the resource section for Post
Scenario: Registering a resource with another name
Given a configuration of:
"""
ActiveAdmin.register Post, as: "My Post"
"""
When I go to the dashboard
Then I should see "My Posts"
When I follow "My Posts"
Then I should see "Hello World"
When I follow "View"
Then I should see "Hello World"
And I should be in the resource section for My Post