mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Adding tests
Adding tests to check that archive widget correctly only shows blog posts from the related blog and not any other blog.
This commit is contained in:
parent
01c1ead069
commit
ebd135b029
@ -1,27 +1,45 @@
|
|||||||
SilverStripe\Blog\Model\Blog:
|
SilverStripe\Blog\Model\Blog:
|
||||||
my-blog:
|
blog-a:
|
||||||
Title: My Blog
|
Title: Blog A
|
||||||
|
blog-b:
|
||||||
|
Title: Blog B
|
||||||
|
|
||||||
SilverStripe\Blog\Model\BlogPost:
|
SilverStripe\Blog\Model\BlogPost:
|
||||||
post-a:
|
post-a:
|
||||||
Title: September Digest
|
Title: September Digest
|
||||||
PublishDate: 2017-09-01 00:00:00
|
PublishDate: 2017-09-01 00:00:00
|
||||||
ParentID: =>SilverStripe\Blog\Model\Blog.my-blog
|
ParentID: =>SilverStripe\Blog\Model\Blog.blog-a
|
||||||
post-b:
|
post-b:
|
||||||
Title: August is Awesome
|
Title: August is Awesome
|
||||||
PublishDate: 2017-08-01 00:00:00
|
PublishDate: 2017-08-01 00:00:00
|
||||||
ParentID: =>SilverStripe\Blog\Model\Blog.my-blog
|
ParentID: =>SilverStripe\Blog\Model\Blog.blog-a
|
||||||
post-c:
|
post-c:
|
||||||
Title: 2015 is so two years ago
|
Title: 2015 is so two years ago
|
||||||
PublishDate: 2015-05-02 00:01:02
|
PublishDate: 2015-05-02 00:01:02
|
||||||
ParentID: =>SilverStripe\Blog\Model\Blog.my-blog
|
ParentID: =>SilverStripe\Blog\Model\Blog.blog-a
|
||||||
|
post-d:
|
||||||
|
Title: Blog post on Blog B
|
||||||
|
PublishDate: 2016-03-13 21:05:36
|
||||||
|
ParentID: =>SilverStripe\Blog\Model\Blog.blog-b
|
||||||
|
post-e:
|
||||||
|
Title: Blog post 2 on Blog B
|
||||||
|
PublishDate: 2016-06-15 10:00:00
|
||||||
|
ParentID: =>SilverStripe\Blog\Model\Blog.blog-b
|
||||||
|
|
||||||
SilverStripe\Blog\Widgets\BlogArchiveWidget:
|
SilverStripe\Blog\Widgets\BlogArchiveWidget:
|
||||||
archive-monthly:
|
archive-monthly-a:
|
||||||
NumberToDisplay: 5
|
NumberToDisplay: 5
|
||||||
ArchiveType: Monthly
|
ArchiveType: Monthly
|
||||||
BlogID: =>SilverStripe\Blog\Model\Blog.my-blog
|
BlogID: =>SilverStripe\Blog\Model\Blog.blog-a
|
||||||
archive-yearly:
|
archive-monthly-b:
|
||||||
|
NumberToDisplay: 5
|
||||||
|
ArchiveType: Monthly
|
||||||
|
BlogID: =>SilverStripe\Blog\Model\Blog.blog-b
|
||||||
|
archive-yearly-a:
|
||||||
NumberToDisplay: 5
|
NumberToDisplay: 5
|
||||||
ArchiveType: Yearly
|
ArchiveType: Yearly
|
||||||
BlogID: =>SilverStripe\Blog\Model\Blog.my-blog
|
BlogID: =>SilverStripe\Blog\Model\Blog.blog-a
|
||||||
|
archive-yearly-b:
|
||||||
|
NumberToDisplay: 5
|
||||||
|
ArchiveType: Yearly
|
||||||
|
BlogID: =>SilverStripe\Blog\Model\Blog.blog-b
|
||||||
|
Loading…
Reference in New Issue
Block a user