Skip to content
Snippets Groups Projects
Commit 795bac44 authored by ysksn's avatar ysksn Committed by Eugen Rochko
Browse files

Add spec for Settings::ExportsController#create (#9512)

parent 55abff8a
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
require 'rails_helper'
describe Settings::ExportsController do
......@@ -28,4 +30,23 @@ describe Settings::ExportsController do
end
end
end
describe 'POST #create' do
before do
sign_in Fabricate(:user), scope: :user
end
it 'redirects to settings_export_path' do
post :create
expect(response).to redirect_to(settings_export_path)
end
it 'queues BackupWorker job by 1' do
Sidekiq::Testing.fake! do
expect do
post :create
end.to change(BackupWorker.jobs, :size).by(1)
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment