aboutsummaryrefslogtreecommitdiffstats
path: root/test/system/pdfresources_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/pdfresources_test.rb')
-rw-r--r--test/system/pdfresources_test.rb55
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