Skip to content

Commit 2913a9e

Browse files
author
David Heinemeier Hansson
committed
Update tests
1 parent 445e316 commit 2913a9e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/scaffold_controller_generator_test.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
3131
assert_instance_method :create, content do |m|
3232
assert_match %r{@post = Post\.new\(post_params\)}, m
3333
assert_match %r{@post\.save}, m
34-
assert_match %r{format\.html \{ redirect_to @post, notice: 'Post was successfully created\.' \}}, m
34+
assert_match %r{format\.html \{ redirect_to @post, notice: "Post was successfully created\." \}}, m
3535
assert_match %r{format\.json \{ render :show, status: :created, location: @post \}}, m
36-
assert_match %r{format\.html \{ render :new \}}, m
36+
assert_match %r{format\.html \{ render :new, status: :unprocessable_entity \}}, m
3737
assert_match %r{format\.json \{ render json: @post\.errors, status: :unprocessable_entity \}}, m
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\." \}}, m
4242
assert_match %r{format\.json \{ render :show, status: :ok, location: @post \}}, m
43-
assert_match %r{format\.html \{ render :edit \}}, m
43+
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_url, notice: 'Post was successfully destroyed\.' \}}, m
49+
assert_match %r{format\.html \{ redirect_to posts_url, notice: "Post was successfully destroyed\." \}}, m
5050
assert_match %r{format\.json \{ head :no_content \}}, m
5151
end
5252

0 commit comments

Comments
 (0)