summaryrefslogtreecommitdiff
path: root/test/system/fertilizer_products_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/fertilizer_products_test.rb')
-rw-r--r--test/system/fertilizer_products_test.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/system/fertilizer_products_test.rb b/test/system/fertilizer_products_test.rb
new file mode 100644
index 0000000..be82ed5
--- /dev/null
+++ b/test/system/fertilizer_products_test.rb
@@ -0,0 +1,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
Copyright 2019--2025 Marius PETER