Add request spec for backups download (#25099)

This commit is contained in:
Matt Jankowski 2023-05-23 09:44:11 -04:00 committed by GitHub
parent ca66e61b93
commit c9f980b268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Backups' do
include RoutingHelper
describe 'GET backups#download' do
let(:user) { Fabricate(:user) }
let(:backup) { Fabricate(:backup, user: user) }
before do
sign_in user
end
it 'Downloads a user backup' do
get download_backup_path(backup)
expect(response).to redirect_to(backup_dump_url)
end
def backup_dump_url
full_asset_url(backup.dump.url)
end
end
end