require "test_helper" class PdfresourcesControllerTest < ActionDispatch::IntegrationTest setup do @pdfresource = pdfresources(:one) end test "should get index" do get pdfresources_url assert_response :success end test "should get new" do get new_pdfresource_url assert_response :success end test "should create pdfresource" do assert_difference("Pdfresource.count") do post pdfresources_url, params: { pdfresource: { age_range: @pdfresource.age_range, card_description: @pdfresource.card_description, curriculum: @pdfresource.curriculum, description: @pdfresource.description, feature_slot: @pdfresource.feature_slot, name: @pdfresource.name, price: @pdfresource.price, stripe_product_id: @pdfresource.stripe_product_id } } end assert_redirected_to pdfresource_url(Pdfresource.last) end test "should show pdfresource" do get pdfresource_url(@pdfresource) assert_response :success end test "should get edit" do get edit_pdfresource_url(@pdfresource) assert_response :success end test "should update pdfresource" do patch pdfresource_url(@pdfresource), params: { pdfresource: { age_range: @pdfresource.age_range, card_description: @pdfresource.card_description, curriculum: @pdfresource.curriculum, description: @pdfresource.description, feature_slot: @pdfresource.feature_slot, name: @pdfresource.name, price: @pdfresource.price, stripe_product_id: @pdfresource.stripe_product_id } } assert_redirected_to pdfresource_url(@pdfresource) end test "should destroy pdfresource" do assert_difference("Pdfresource.count", -1) do delete pdfresource_url(@pdfresource) end assert_redirected_to pdfresources_url end end