/** * Testing Lot Update function */ public function testUpdate() { $this->withoutMiddleware(); $response = $this->call('POST', '/lot', $this->inputUpdate); $this->assertTrue($response->isRedirection()); $testLot = Lot::orderBy('id', 'desc')->first(); $this->assertEquals($testLot->lot_no, $this->inputUpdate['lot_no']); $this->assertEquals($testLot->description, $this->inputUpdate['description']); $this->assertEquals($testLot->expiry, $this->inputUpdate['expiry']); }