Skip to content

Commit

Permalink
Fix views/absence_requests specs (#1031)
Browse files Browse the repository at this point in the history
Closes #1012
  • Loading branch information
maxkadel authored and christinach committed Feb 29, 2024
1 parent 18db837 commit 5ab862e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/views/absence_requests/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
expect(rendered).to match(/Vacation \(#{Time.zone.now.strftime('%m/%d/%Y')} to #{Time.zone.tomorrow.strftime('%m/%d/%Y')}\)/)
expect(rendered).to include("Sally Smith on")
expect(rendered).to include(absence_request.notes.first.content)
expect(rendered).to have_selector("hyperlink[href=\"#{edit_absence_request_path(absence_request.id)}\"]", text: "Edit")
expect(rendered).to have_selector("lux-hyperlink[href=\"#{edit_absence_request_path(absence_request.id)}\"]", text: "Edit")
expect(rendered).to have_selector("form[action=\"#{decide_absence_request_path(absence_request.id)}\"]")
expect(rendered).to have_selector("input-button", text: "Cancel")
expect(rendered).to have_selector("lux-input-button", text: "Cancel")
end

context "not the creator" do
Expand All @@ -28,7 +28,7 @@
allow(view).to receive(:current_staff_profile).and_return(nil)
render
end
expect(rendered).not_to have_selector("hyperlink[href=\"#{edit_absence_request_path(absence_request.id)}\"]", text: "Edit")
expect(rendered).not_to have_selector("lux-hyperlink[href=\"#{edit_absence_request_path(absence_request.id)}\"]", text: "Edit")
expect(rendered).not_to have_selector("form[action=\"#{decide_absence_request_path(absence_request.id)}\"]")
end
end
Expand Down

0 comments on commit 5ab862e

Please sign in to comment.