forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved the belongs_to integration test to a cucumber feature
- Loading branch information
Showing
5 changed files
with
45 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Feature: Belongs To | ||
|
||
A resource belongs to another resource | ||
|
||
Background: | ||
Given a configuration of: | ||
""" | ||
ActiveAdmin.register User | ||
ActiveAdmin.register Post do | ||
belongs_to :user | ||
end | ||
""" | ||
And I am logged in | ||
And a post with the title "Hello World" written by "John Doe" exists | ||
And a post with the title "Hello World" written by "Jane Doe" exists | ||
|
||
Scenario: Viewing the child resource index page | ||
When I go to the last author's posts | ||
Then the "Users" tab should be selected | ||
And I should see "Displaying 1 Post" | ||
And I should see a link to "Users" in the breadcrumb | ||
|
||
Scenario: Viewing a child resource page | ||
When I go to the last author's posts | ||
And I follow "View" | ||
Then I should be on the last author's last post page | ||
And the "Users" tab should be selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Then /^I should see a link to "([^"]*)" in the breadcrumb$/ do |text| | ||
within ".breadcrumb" do | ||
page.should have_css("a", :text => text) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.