From e72987ddc5d01276f63444c1efc69d3132a74d70 Mon Sep 17 00:00:00 2001 From: Yuka Kato Date: Mon, 5 Sep 2016 12:41:14 +0900 Subject: [PATCH] [WIP][ci skip]Create feature --- test/features/comment_creation_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/features/comment_creation_test.rb diff --git a/test/features/comment_creation_test.rb b/test/features/comment_creation_test.rb new file mode 100644 index 0000000..ec45500 --- /dev/null +++ b/test/features/comment_creation_test.rb @@ -0,0 +1,18 @@ +require 'test_helper' + +feature 'CommentCreation' do + scenario 'User create comment to post' do + stub_authentication_with 'alice' + + visit post_path(post) + + body = 'Lorem ipsum dolor sit amet' + + fill_in 'comment_body', with: body + click_button 'create comment' + + within '.comment__body' do + expect(page).must_have_content 'Lorem ipsum dolor sit amet' + end + end +end