public function testAvoidColumns() { $post = new Post(); $post->setRevisionColumnsToAvoid(['title']); $post->title = 'Testing'; $post->description = 'Testing'; $post->save(); $post->title = 'New Title'; $post->save(); $this->assertEquals(0, Revision::all()->count()); }
public function testAvoidColumns() { $post = new Post(); $post->setRevisionColumnsToAvoid(['title']); $post->title = 'Testing'; $post->description = 'Testing'; $post->save(); $revisions = Revision::all(); $this->assertEquals(4, $revisions->count()); $this->assertEquals('id', $revisions->get(0)->key); $this->assertEquals('description', $revisions->get(1)->key); $this->assertEquals('created_at', $revisions->get(2)->key); $this->assertEquals('updated_at', $revisions->get(3)->key); }