aboutsummaryrefslogtreecommitdiffstats
path: root/test/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/pdfresources_controller_test.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/controllers/pdfresources_controller_test.rb b/test/controllers/pdfresources_controller_test.rb
new file mode 100644
index 0000000..bacd96e
--- /dev/null
+++ b/test/controllers/pdfresources_controller_test.rb
@@ -0,0 +1,48 @@
+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