aboutsummaryrefslogtreecommitdiffstats
path: root/test/system
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-14 15:47:43 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-14 15:47:43 +0000
commit6427b28c60c6ed0dfd637307d1ab4ffe65c1144d (patch)
tree156d280b94557f9606c053f6187aec2a21eb1b36 /test/system
parent1b64b0b709c5704de48120e20bdfad32f34b0b5d (diff)
Adds ResourceType model
Diffstat (limited to 'test/system')
-rw-r--r--test/system/resource_types_test.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/system/resource_types_test.rb b/test/system/resource_types_test.rb
new file mode 100644
index 0000000..54fc45f
--- /dev/null
+++ b/test/system/resource_types_test.rb
@@ -0,0 +1,41 @@
+require "application_system_test_case"
+
+class ResourceTypesTest < ApplicationSystemTestCase
+ setup do
+ @resource_type = resource_types(:one)
+ end
+
+ test "visiting the index" do
+ visit resource_types_url
+ assert_selector "h1", text: "Resource types"
+ end
+
+ test "should create resource type" do
+ visit resource_types_url
+ click_on "New resource type"
+
+ fill_in "Name", with: @resource_type.name
+ click_on "Create Resource type"
+
+ assert_text "Resource type was successfully created"
+ click_on "Back"
+ end
+
+ test "should update Resource type" do
+ visit resource_type_url(@resource_type)
+ click_on "Edit this resource type", match: :first
+
+ fill_in "Name", with: @resource_type.name
+ click_on "Update Resource type"
+
+ assert_text "Resource type was successfully updated"
+ click_on "Back"
+ end
+
+ test "should destroy Resource type" do
+ visit resource_type_url(@resource_type)
+ click_on "Destroy this resource type", match: :first
+
+ assert_text "Resource type was successfully destroyed"
+ end
+end