summaryrefslogtreecommitdiff
path: root/test/system/beds_test.rb
blob: b5e6a86eb7980b88510d9a519b58f7e7b0a5c68d (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
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