2024-09-05 22:54:38 +02:00
|
|
|
# frozen_string_literal: true
|
2024-07-24 01:48:27 +02:00
|
|
|
|
2024-09-05 22:54:38 +02:00
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
|
|
module Admin
|
2024-11-08 22:05:31 +01:00
|
|
|
class BackupsControllerTest < ::ControllerTest
|
2024-09-22 22:49:53 +02:00
|
|
|
teardown do
|
|
|
|
|
logout
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
setup do
|
2024-11-08 22:05:31 +01:00
|
|
|
User.create!(email_address: "test@example.com", password: "password")
|
2024-09-22 22:49:53 +02:00
|
|
|
login("test@example.com", "password")
|
|
|
|
|
end
|
|
|
|
|
|
2024-10-27 03:38:15 +01:00
|
|
|
test "should create admin_backup xlsx" do
|
|
|
|
|
get admin_backup_url(@admin_backup, format: :xlsx)
|
|
|
|
|
assert_response :success
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "should create admin_backup zip" do
|
|
|
|
|
get admin_backup_url(@admin_backup, format: :zip)
|
2024-09-05 22:54:38 +02:00
|
|
|
assert_response :success
|
|
|
|
|
end
|
2024-07-24 01:48:27 +02:00
|
|
|
end
|
|
|
|
|
end
|