@@ -38,15 +38,15 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
38
38
end
39
39
40
40
assert_instance_method :update , content do |m |
41
- assert_match %r{format\. html \{ redirect_to @post, notice: "Post was successfully updated\. " \} } , m
41
+ assert_match %r{format\. html \{ redirect_to @post, notice: "Post was successfully updated\. ", status: :see_other \} } , m
42
42
assert_match %r{format\. json \{ render :show, status: :ok, location: @post \} } , m
43
43
assert_match %r{format\. html \{ render :edit, status: :unprocessable_entity \} } , m
44
44
assert_match %r{format\. json \{ render json: @post.errors, status: :unprocessable_entity \} } , m
45
45
end
46
46
47
47
assert_instance_method :destroy , content do |m |
48
48
assert_match %r{@post\. destroy} , m
49
- assert_match %r{format\. html \{ redirect_to posts_path, status: :see_other, notice: "Post was successfully destroyed\. " \} } , m
49
+ assert_match %r{format\. html \{ redirect_to posts_path, notice: "Post was successfully destroyed\. ", status: :see_other \} } , m
50
50
assert_match %r{format\. json \{ head :no_content \} } , m
51
51
end
52
52
@@ -77,11 +77,11 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
77
77
end
78
78
79
79
assert_instance_method :update , content do |m |
80
- assert_match %r{format\. html \{ redirect_to \[ :admin, @post\] , notice: "Post was successfully updated\. " \} } , m
80
+ assert_match %r{format\. html \{ redirect_to \[ :admin, @post\] , notice: "Post was successfully updated\. ", status: :see_other \} } , m
81
81
end
82
82
83
83
assert_instance_method :destroy , content do |m |
84
- assert_match %r{format\. html \{ redirect_to admin_posts_path, status: :see_other, notice: "Post was successfully destroyed\. " \} } , m
84
+ assert_match %r{format\. html \{ redirect_to admin_posts_path, notice: "Post was successfully destroyed\. ", status: :see_other \} } , m
85
85
end
86
86
end
87
87
end
0 commit comments