Skip to content

Commit fc3f6b8

Browse files
committed
Fix false positive test pass in turbu spec
1 parent 79ed86d commit fc3f6b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/stimulus/turbo_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,25 @@
6363
initial_comment_count = Comment.all.count
6464
fill_in text_field, with: comment.text
6565
click_button("Post")
66+
67+
expect(page).to have_text("Author: can't be blank")
6668
expect(Comment.all.count).to equal(initial_comment_count)
6769
end
6870

6971
it "comment count remains the same when text field is empty" do
7072
initial_comment_count = Comment.all.count
7173
fill_in author_field, with: comment.author
7274
click_button("Post")
75+
76+
expect(page).to have_text("Text: can't be blank")
7377
expect(Comment.all.count).to equal(initial_comment_count)
7478
end
7579

7680
it "comment count remains the same when both form fields are empty" do
7781
initial_comment_count = Comment.all.count
7882
click_button("Post")
83+
84+
expect(page).to have_text("Author: can't be blank")
7985
expect(Comment.all.count).to equal(initial_comment_count)
8086
end
8187
end

0 commit comments

Comments
 (0)