Sha256: d16c3e65693d9e259c6dd7a493959c019ede04248a66998790730f7012df47e6
Contents?: true
Size: 937 Bytes
Versions: 1
Compression:
Stored size: 937 Bytes
Contents
require "application_system_test_case" class PostsTest < ApplicationSystemTestCase setup do @post = posts(:one) end test "visiting the index" do visit posts_url assert_selector "h1", text: "Posts" end test "creating a Post" do visit posts_url click_on "New Post" fill_in "Context", with: @post.context fill_in "Title", with: @post.title click_on "Create Post" assert_text "Post was successfully created" click_on "Back" end test "updating a Post" do visit posts_url click_on "Edit", match: :first fill_in "Context", with: @post.context fill_in "Title", with: @post.title click_on "Update Post" assert_text "Post was successfully updated" click_on "Back" end test "destroying a Post" do visit posts_url page.accept_confirm do click_on "Destroy", match: :first end assert_text "Post was successfully destroyed" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
power_trace-0.3.0 | examples/rails-6/test/system/posts_test.rb |