summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/uncached_response_shared_examples.rb
blob: 3997017ff355ccfed57cf8f324b48121482a52b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true
#
# Pairs with lib/gitlab/no_cache_headers.rb
#

RSpec.shared_examples 'uncached response' do
  it 'defines an uncached header response' do
    expect(response.headers["Cache-Control"]).to include("no-store", "no-cache")
    expect(response.headers["Pragma"]).to eq("no-cache")
    expect(response.headers["Expires"]).to eq("Fri, 01 Jan 1990 00:00:00 GMT")
  end
end