From d270ae5fffcdbb30cc2aef286cefb94e54772d0e Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sun, 18 Nov 2018 17:31:33 +0800 Subject: [PATCH] Add unit model test --- tests/Unit/Integration/UnitTest.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/Unit/Integration/UnitTest.php diff --git a/tests/Unit/Integration/UnitTest.php b/tests/Unit/Integration/UnitTest.php new file mode 100644 index 0000000..b77ec7f --- /dev/null +++ b/tests/Unit/Integration/UnitTest.php @@ -0,0 +1,24 @@ +create(); + $product = factory(Product::class)->create(['unit_id' => $unit->id]); + + $this->assertInstanceOf(Collection::class, $unit->products); + $this->assertInstanceOf(Product::class, $unit->products->first()); + } +}