Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Fix columns of the public label export
Browse files Browse the repository at this point in the history
It should contain the source_id instead of the label_source_id.
The UUID is unnecessary.
  • Loading branch information
mzur committed Aug 15, 2019
1 parent 1584e86 commit 34e6cfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/Support/Export/PublicLabelExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public function getContent()
'parent_id',
'color',
'label_tree_id',
'label_source_id',
'uuid',
'source_id',
];
$csv->fputcsv($columns);

Expand All @@ -46,8 +45,7 @@ public function getContent()
$row->parent_id,
$row->color,
$row->label_tree_id,
$row->label_source_id,
$row->uuid,
$row->source_id,
]);
}
});
Expand Down
8 changes: 3 additions & 5 deletions tests/Support/Export/PublicLabelExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PublicLabelExportTest extends TestCase
{
public function testGetContent()
{
$parent = LabelTest::create();
$parent = LabelTest::create(['source_id' => 'abcdef']);
$child = LabelTest::create([
'label_tree_id' => $parent->label_tree_id,
'parent_id' => $parent->id,
Expand All @@ -30,8 +30,7 @@ public function testGetContent()
"{$parent->parent_id}",
"{$parent->color}",
"{$parent->label_tree_id}",
"{$parent->label_source_id}",
"{$parent->uuid}",
"{$parent->source_id}",
];
$this->assertEquals($expectParent, $file->fgetcsv());

Expand All @@ -41,8 +40,7 @@ public function testGetContent()
"{$child->parent_id}",
"{$child->color}",
"{$child->label_tree_id}",
"{$child->label_source_id}",
"{$child->uuid}",
"{$child->source_id}",
];
$this->assertEquals($expectChild, $file->fgetcsv());
}
Expand Down
3 changes: 1 addition & 2 deletions tests/Support/Export/PublicLabelTreeExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public function testGetAdditionalExports()
"{$label->parent_id}",
"{$label->color}",
"{$label->label_tree_id}",
"{$label->label_source_id}",
"{$label->uuid}",
"{$label->source_id}",
];
$this->assertEquals($expect, $file->fgetcsv());
}
Expand Down

0 comments on commit 34e6cfa

Please sign in to comment.