blob: 217b5522202d1eeb08fa91825e7bc4e2a7339bed (
plain) (
tree)
|
|
require "test_helper"
class PdfresourcesControllerTest < ActionDispatch::IntegrationTest
setup do
@pdfresource1 = pdfresources(:one)
@pdfresource2 = pdfresources(:two)
@pdfresource = pdfresources(:three)
@user = users(:one)
post session_url, params: { email_address: @user.email_address, password: "password" }
follow_redirect! # After login
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
skip "Not implemented yet - requires image processing tests"
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
skip "Not implemented yet - requires image processing tests"
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 } }
skip "Not implemented yet - requires image processing tests"
assert_redirected_to pdfresource_url(@pdfresource)
end
test "should destroy pdfresource" do
assert_difference("Pdfresource.count", -1) do
delete pdfresource_url(@pdfresource1)
end
assert_redirected_to pdfresources_url
end
end
|