Skip to content

Commit

Permalink
Merge pull request #1053 from biigle/patch-1
Browse files Browse the repository at this point in the history
Fix basic report script for empty volume
  • Loading branch information
mzur authored Jan 20, 2025
2 parents 02713f6 + c3ac106 commit c3fc384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ protected function query()
* @param string $title The title to put in the first row of the CSV
* @return CsvFile
*/
protected function createCsv($labels, $title = '')
protected function createCsv($labels, $title = "\n")
{
$csv = CsvFile::makeTmp();
// The title must not be empty as the Python
// script expects one line as title.
$csv->put($title);

foreach ($labels as $label) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testGenerateReport()

$mock->shouldReceive('put')
->once()
->with('');
->with("\n");

$mock->shouldReceive('putCsv')
->once()
Expand Down

0 comments on commit c3fc384

Please sign in to comment.