mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #40745
This commit is contained in:
commit
babc9eae9d
3 changed files with 12 additions and 4 deletions
|
@ -913,7 +913,7 @@ You can also run `bin/rails test:all` to run all tests, including system tests.
|
|||
Now let's test the flow for creating a new article in our blog.
|
||||
|
||||
```ruby
|
||||
test "creating an article" do
|
||||
test "should create Article" do
|
||||
visit articles_path
|
||||
|
||||
click_on "New Article"
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
* Modified scaffold generator template so that running
|
||||
`rails g scaffold Author` no longer generates tests called "creating
|
||||
a Author", "updating a Author", and "destroying a Author"
|
||||
|
||||
Fixes #40744.
|
||||
|
||||
*Michael Duchemin*
|
||||
|
||||
* Raise an error in generators if a field type is invalid.
|
||||
|
||||
*Petrik de Heus*
|
||||
|
|
|
@ -11,7 +11,7 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|||
assert_selector "h1", text: "<%= class_name.pluralize.titleize %>"
|
||||
end
|
||||
|
||||
test "creating a <%= human_name %>" do
|
||||
test "should create <%= human_name %>" do
|
||||
visit <%= plural_table_name %>_url
|
||||
click_on "New <%= class_name.titleize %>"
|
||||
|
||||
|
@ -28,7 +28,7 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|||
click_on "Back"
|
||||
end
|
||||
|
||||
test "updating a <%= human_name %>" do
|
||||
test "should update <%= human_name %>" do
|
||||
visit <%= plural_table_name %>_url
|
||||
click_on "Edit", match: :first
|
||||
|
||||
|
@ -45,7 +45,7 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|||
click_on "Back"
|
||||
end
|
||||
|
||||
test "destroying a <%= human_name %>" do
|
||||
test "should destroy <%= human_name %>" do
|
||||
visit <%= plural_table_name %>_url
|
||||
page.accept_confirm do
|
||||
click_on "Destroy", match: :first
|
||||
|
|
Loading…
Reference in a new issue