summaryrefslogtreecommitdiff
path: root/test/system/beds_test.rb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-08-29 14:22:37 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-08-29 14:22:37 +0200
commit075665c588989ed0decdfb20d83f32b33eed4639 (patch)
treed9ec78be7338bd51c895b7fb311f081a7c77c45f /test/system/beds_test.rb
parent52b044d6a4278c229992404ad5801769c2d13363 (diff)
Properly implement bed and raft management logic.
Diffstat (limited to 'test/system/beds_test.rb')
-rw-r--r--test/system/beds_test.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/system/beds_test.rb b/test/system/beds_test.rb
new file mode 100644
index 0000000..b5e6a86
--- /dev/null
+++ b/test/system/beds_test.rb
@@ -0,0 +1,39 @@
+require "application_system_test_case"
+
+class BedsTest < ApplicationSystemTestCase
+ setup do
+ @bed = beds(:one)
+ end
+
+ test "visiting the index" do
+ visit beds_url
+ assert_selector "h1", text: "Beds"
+ end
+
+ test "should create bed" do
+ visit beds_url
+ click_on "New bed"
+
+ click_on "Create Bed"
+
+ assert_text "Bed was successfully created"
+ click_on "Back"
+ end
+
+ test "should update Bed" do
+ visit bed_url(@bed)
+ click_on "Edit this bed", match: :first
+
+ click_on "Update Bed"
+
+ assert_text "Bed was successfully updated"
+ click_on "Back"
+ end
+
+ test "should destroy Bed" do
+ visit bed_url(@bed)
+ click_on "Destroy this bed", match: :first
+
+ assert_text "Bed was successfully destroyed"
+ end
+end
Copyright 2019--2025 Marius PETER