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
|
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
|