Browse Source

More tests.

euromark 11 years ago
parent
commit
9ae2dcf395
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/TestCase/Model/Behavior/SluggedBehaviorTest.php

+ 4 - 0
tests/TestCase/Model/Behavior/SluggedBehaviorTest.php

@@ -103,6 +103,10 @@ class SluggedBehaviorTest extends TestCase {
 		$result = $this->articles->save($article);
 		$this->assertEquals('Some-Cool-String', $result['slug']);
 
+		$article = $this->articles->newEntity(array('title' => 'Some Other String'));
+		$result = $this->articles->save($article);
+		$this->assertEquals('Some-Other-String', $result['slug']);
+
 		$this->articles->patchEntity($article, ['title' => 'Some Cool Other String', 'slug' => 'foo-bar']);
 		$result = $this->articles->save($article);
 		$this->assertEquals('foo-bar', $result['slug']);