Skip to content

Commit

Permalink
Add request spec for backups download (mastodon#25099)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored May 23, 2023
1 parent ca66e61 commit c9f980b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec/requests/backups_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c9f980b

Please sign in to comment.