@@ -38,15 +38,15 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
3838 end
3939
4040 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
4242 assert_match %r{format\. json \{ render :show, status: :ok, location: @post \} } , m
4343 assert_match %r{format\. html \{ render :edit, status: :unprocessable_entity \} } , m
4444 assert_match %r{format\. json \{ render json: @post.errors, status: :unprocessable_entity \} } , m
4545 end
4646
4747 assert_instance_method :destroy , content do |m |
4848 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
5050 assert_match %r{format\. json \{ head :no_content \} } , m
5151 end
5252
@@ -77,11 +77,11 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
7777 end
7878
7979 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
8181 end
8282
8383 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
8585 end
8686 end
8787 end
0 commit comments