FIX: exporting result in CSV format was broken

This commit is contained in:
Arpit Jalan 2017-10-04 00:28:28 +05:30
parent 9fd366a9fd
commit 07cb0005b0
2 changed files with 7 additions and 1 deletions

View File

@ -1077,7 +1077,7 @@ SQL
end
end
render text: text
render plain: text
end
end
end

View File

@ -234,5 +234,11 @@ describe DataExplorer::QueryController do
expect(response_json['success']).to eq(false)
expect(response_json['errors'].first).to match(/syntax error/)
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