1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
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
|