Sha256: 9aed31c49f59ed23212e648fd350915c28fe0fa7a5329273d03ac04e565cf137
Contents?: true
Size: 1.1 KB
Versions: 5
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true require "application_system_test_case" class ProductsTest < ApplicationSystemTestCase setup do @product = products(:one) end test "visiting the index" do visit products_url assert_selector "h1", text: "Products" end test "creating a Product" do visit products_url click_on "New Product" fill_in "Description", with: @product.description fill_in "Name", with: @product.name fill_in "Price", with: @product.price click_on "Create Product" assert_text "Product was successfully created" click_on "Back" end test "updating a Product" do visit products_url click_on "Edit", match: :first fill_in "Description", with: @product.description fill_in "Name", with: @product.name fill_in "Price", with: @product.price click_on "Update Product" assert_text "Product was successfully updated" click_on "Back" end test "destroying a Product" do visit products_url page.accept_confirm do click_on "Destroy", match: :first end assert_text "Product was successfully destroyed" end end
Version data entries
5 entries across 5 versions & 1 rubygems