2020-01-30 16:08:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Gitlab::NoCacheHeaders do
|
2020-05-20 17:09:09 -04:00
|
|
|
before do
|
|
|
|
stub_const('NoCacheTester', Class.new)
|
|
|
|
NoCacheTester.class_eval do
|
|
|
|
include Gitlab::NoCacheHeaders
|
|
|
|
end
|
2020-01-30 16:08:47 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "#no_cache_headers" do
|
|
|
|
subject { NoCacheTester.new }
|
|
|
|
|
|
|
|
it "raises a RuntimeError" do
|
|
|
|
expect { subject.no_cache_headers }.to raise_error(RuntimeError)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|