require "application_system_test_case" class PdfresourcesTest < ApplicationSystemTestCase setup do @pdfresource = pdfresources(:one) end test "visiting the index" do visit pdfresources_url assert_selector "h1", text: "Pdfresources" end test "should create pdfresource" do visit pdfresources_url click_on "New pdfresource" fill_in "Age range", with: @pdfresource.age_range fill_in "Card description", with: @pdfresource.card_description fill_in "Curriculum", with: @pdfresource.curriculum fill_in "Description", with: @pdfresource.description fill_in "Feature slot", with: @pdfresource.feature_slot fill_in "Name", with: @pdfresource.name fill_in "Price", with: @pdfresource.price fill_in "Stripe product", with: @pdfresource.stripe_product_id click_on "Create Pdfresource" assert_text "Pdfresource was successfully created" click_on "Back" end test "should update Pdfresource" do visit pdfresource_url(@pdfresource) click_on "Edit this pdfresource", match: :first fill_in "Age range", with: @pdfresource.age_range fill_in "Card description", with: @pdfresource.card_description fill_in "Curriculum", with: @pdfresource.curriculum fill_in "Description", with: @pdfresource.description fill_in "Feature slot", with: @pdfresource.feature_slot fill_in "Name", with: @pdfresource.name fill_in "Price", with: @pdfresource.price fill_in "Stripe product", with: @pdfresource.stripe_product_id click_on "Update Pdfresource" assert_text "Pdfresource was successfully updated" click_on "Back" end test "should destroy Pdfresource" do visit pdfresource_url(@pdfresource) click_on "Destroy this pdfresource", match: :first assert_text "Pdfresource was successfully destroyed" end end