Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Markech
refinerycms-news
Commits
bf79a51c
Commit
bf79a51c
authored
May 03, 2012
by
Uģis Ozols
Browse files
Add spec for news_item_archive_links helper method.
parent
2fea168f
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec/helpers/refinery/news/items_helper_spec.rb
0 → 100644
View file @
bf79a51c
require
'spec_helper'
module
Refinery
module
News
describe
ItemsHelper
do
describe
'#news_item_archive_links'
do
before
do
2
.
times
{
FactoryGirl
.
create
(
:news_item
,
:publish_date
=>
Time
.
utc
(
2012
,
05
))
}
3
.
times
{
FactoryGirl
.
create
(
:news_item
,
:publish_date
=>
Time
.
utc
(
2012
,
04
))
}
end
it
'returns list of links to archives'
do
expected
=
'<ul><li><a href="/news/archive/2012/5">May 2012 (2)</a></li><li><a href="/news/archive/2012/4">April 2012 (3)</a></li></ul>'
helper
.
news_item_archive_links
.
should
eq
(
expected
)
end
end
end
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment