mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-06-29 19:12:11 +00:00
FIX: exporting result in CSV format was broken
This commit is contained in:
parent
9fd366a9fd
commit
07cb0005b0
@ -1077,7 +1077,7 @@ SQL
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
render text: text
|
render plain: text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -234,5 +234,11 @@ describe DataExplorer::QueryController do
|
|||||||
expect(response_json['success']).to eq(false)
|
expect(response_json['success']).to eq(false)
|
||||||
expect(response_json['errors'].first).to match(/syntax error/)
|
expect(response_json['errors'].first).to match(/syntax error/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "can export data in CSV format" do
|
||||||
|
q = make_query('SELECT 23 as my_value')
|
||||||
|
post :run, params: { id: q.id, download: 1 }, format: :csv
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user