File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 63
63
initial_comment_count = Comment . all . count
64
64
fill_in text_field , with : comment . text
65
65
click_button ( "Post" )
66
+
67
+ expect ( page ) . to have_text ( "Author: can't be blank" )
66
68
expect ( Comment . all . count ) . to equal ( initial_comment_count )
67
69
end
68
70
69
71
it "comment count remains the same when text field is empty" do
70
72
initial_comment_count = Comment . all . count
71
73
fill_in author_field , with : comment . author
72
74
click_button ( "Post" )
75
+
76
+ expect ( page ) . to have_text ( "Text: can't be blank" )
73
77
expect ( Comment . all . count ) . to equal ( initial_comment_count )
74
78
end
75
79
76
80
it "comment count remains the same when both form fields are empty" do
77
81
initial_comment_count = Comment . all . count
78
82
click_button ( "Post" )
83
+
84
+ expect ( page ) . to have_text ( "Author: can't be blank" )
79
85
expect ( Comment . all . count ) . to equal ( initial_comment_count )
80
86
end
81
87
end
You can’t perform that action at this time.
0 commit comments