diff options
Diffstat (limited to 'spec/requests/api/repositories_spec.rb')
-rw-r--r-- | spec/requests/api/repositories_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index 0c66bfd6c4d..55243e83017 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -177,6 +177,12 @@ describe API::Repositories do expect(headers['Content-Disposition']).to eq 'inline' end + it_behaves_like 'uncached response' do + before do + get api(route, current_user) + end + end + context 'when sha does not exist' do it_behaves_like '404 response' do let(:request) { get api(route.sub(sample_blob.oid, 'abcd9876'), current_user) } @@ -278,7 +284,7 @@ describe API::Repositories do context "when hotlinking detection is enabled" do before do - Feature.enable(:repository_archive_hotlinking_interception) + stub_feature_flags(repository_archive_hotlinking_interception: true) end it_behaves_like "hotlink interceptor" do |