mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
🐎 gzip csv export files
This commit is contained in:
parent
d7b924abad
commit
b94c7922c5
2 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
require "spec_helper"
|
||||
|
||||
describe ExportCsvController do
|
||||
let(:export_filename) { "user-archive-999.csv" }
|
||||
let(:export_filename) { "user-archive-999.csv.gz" }
|
||||
|
||||
|
||||
context "while logged in as normal user" do
|
||||
|
@ -30,7 +30,7 @@ describe ExportCsvController do
|
|||
describe ".download" do
|
||||
it "uses send_file to transmit the export file" do
|
||||
file = UserExport.create(export_type: "user", user_id: @user.id)
|
||||
file_name = "user-archive-#{file.id}.csv"
|
||||
file_name = "user-archive-#{file.id}.csv.gz"
|
||||
controller.stubs(:render)
|
||||
export = UserExport.new()
|
||||
UserExport.expects(:get_download_path).with(file_name).returns(export)
|
||||
|
@ -74,7 +74,7 @@ describe ExportCsvController do
|
|||
describe ".download" do
|
||||
it "uses send_file to transmit the export file" do
|
||||
file = UserExport.create(export_type: "admin", user_id: @admin.id)
|
||||
file_name = "screened-email-#{file.id}.csv"
|
||||
file_name = "screened-email-#{file.id}.csv.gz"
|
||||
controller.stubs(:render)
|
||||
export = UserExport.new()
|
||||
UserExport.expects(:get_download_path).with(file_name).returns(export)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue