diff options
author | Marius Peter <marius.peter@tutanota.com> | 2025-08-29 14:22:37 +0200 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2025-08-29 14:22:37 +0200 |
commit | 075665c588989ed0decdfb20d83f32b33eed4639 (patch) | |
tree | d9ec78be7338bd51c895b7fb311f081a7c77c45f /test/system | |
parent | 52b044d6a4278c229992404ad5801769c2d13363 (diff) |
Properly implement bed and raft management logic.
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/beds_test.rb | 39 |
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 |