Skip to content

Commit

Permalink
Add tests for get bundles with fields
Browse files Browse the repository at this point in the history
  • Loading branch information
almasaeed2010 committed Feb 27, 2019
1 parent 871a281 commit 4300c71
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Feature/BundleHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,19 @@ public function testGettingFieldsByTerm() {
$this->assertObjectHasAttribute('name', $field);
$this->assertObjectHasAttribute('label', $field);
}

/** @test */
public function testGettingBundlesWithFields() {
$helper = new BundleHelper();

$bundles = $helper->getBundlesWithFields();
$this->assertNotEmpty($bundles);

$bundle = $bundles[0];
$this->assertObjectHasAttribute('fields', $bundle);
$this->assertObjectHasAttribute('name', $bundle);
$this->assertObjectHasAttribute('label', $bundle);
$this->assertObjectHasAttribute('cv_name', $bundle);
$this->assertObjectHasAttribute('accession', $bundle);
}
}

0 comments on commit 4300c71

Please sign in to comment.