From 4e175b0de5a6d8da1f61078354dec545efdde665 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..b69844d --- /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