blob: be82ed570c435c807de0a2be3d7a886afa9cdfaa (
plain)
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
|
require "application_system_test_case"
class FertilizerProductsTest < ApplicationSystemTestCase
setup do
@fertilizer_product = fertilizer_products(:one)
end
test "visiting the index" do
visit fertilizer_products_url
assert_selector "h1", text: "Fertilizer products"
end
test "should create fertilizer product" do
visit fertilizer_products_url
click_on "New fertilizer product"
fill_in "Name", with: @fertilizer_product.name
fill_in "Purity", with: @fertilizer_product.purity
click_on "Create Fertilizer product"
assert_text "Fertilizer product was successfully created"
click_on "Back"
end
test "should update Fertilizer product" do
visit fertilizer_product_url(@fertilizer_product)
click_on "Edit this fertilizer product", match: :first
fill_in "Name", with: @fertilizer_product.name
fill_in "Purity", with: @fertilizer_product.purity
click_on "Update Fertilizer product"
assert_text "Fertilizer product was successfully updated"
click_on "Back"
end
test "should destroy Fertilizer product" do
visit fertilizer_product_url(@fertilizer_product)
click_on "Destroy this fertilizer product", match: :first
assert_text "Fertilizer product was successfully destroyed"
end
end
|