diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-11 16:33:24 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-11 16:33:24 +0000 |
commit | b8d7a7cf7e78fe384c6c6e8e6812a252084ce1f0 (patch) | |
tree | 5ef297ac23775afb1bcffb68265749d08f282297 /test/system | |
parent | 97201e0bca203b6b303789374ffd7e4228e062a7 (diff) |
Adds first pdfresource model
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/pdfresources_test.rb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/system/pdfresources_test.rb b/test/system/pdfresources_test.rb new file mode 100644 index 0000000..4f7cbf9 --- /dev/null +++ b/test/system/pdfresources_test.rb @@ -0,0 +1,55 @@ +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 |