Convert invites controller spec to system/request specs (#31755)
This commit is contained in:
parent
5b1ae15a36
commit
e820cc30b8
6 changed files with 135 additions and 85 deletions
14
spec/support/matchers/private_cache_control.rb
Normal file
14
spec/support/matchers/private_cache_control.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue