0
0
Fork 0

Convert invites controller spec to system/request specs (#31755)

This commit is contained in:
Matt Jankowski 2024-09-05 07:54:27 -04:00 committed by GitHub
parent 5b1ae15a36
commit e820cc30b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 135 additions and 85 deletions

View file

@ -0,0 +1,14 @@
# frozen_string_literal: true
RSpec::Matchers.define :have_private_cache_control do
match do |page|
page.response_headers['Cache-Control'] == 'private, no-store'
end
failure_message do |page|
<<~ERROR
Expected page to have `Cache-Control` header with `private, no-store` but it has:
#{page.response_headers['Cache-Control']}
ERROR
end
end