Cviebrock\EloquentSluggable\Tests\OnUpdateTests::testSlugDoesNotChangeIfSourceDoesNotChange PHP Method

testSlugDoesNotChangeIfSourceDoesNotChange() public method

Test that the slug is not regenerated if onUpdate is true but the source fields didn't change.
    public function testSlugDoesNotChangeIfSourceDoesNotChange()
    {
        $post = PostWithOnUpdate::create(['title' => 'My First Post']);
        $post->save();
        $this->assertEquals('my-first-post', $post->slug);
        $post->update(['subtitle' => 'A Subtitle']);
        $this->assertEquals('my-first-post', $post->slug);
    }