mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
MINOR: Add test to for blog tag urlsegment generation
This behaviour confused me so adding a test to clarify that it’s intentional.
This commit is contained in:
parent
50d928101c
commit
f5c2537c03
@ -203,4 +203,17 @@ class BlogTagTest extends FunctionalTest
|
|||||||
$this->assertEquals(BlogTag::DUPLICATE_EXCEPTION, $messages[0]['messageType']);
|
$this->assertEquals(BlogTag::DUPLICATE_EXCEPTION, $messages[0]['messageType']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testBlogTagUrlSegmentsAreAutomaticallyUpdated()
|
||||||
|
{
|
||||||
|
$tag = new BlogTag;
|
||||||
|
$tag->Title = "a test";
|
||||||
|
$tag->write();
|
||||||
|
$this->assertEquals($tag->URLSegment, "a-test");
|
||||||
|
|
||||||
|
$tag->Title = "another test";
|
||||||
|
$tag->write();
|
||||||
|
$this->assertEquals($tag->URLSegment, "another-test");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user