diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2014-01-20 11:25:47 +0200 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2014-01-20 11:25:47 +0200 |
commit | 249af183145b1608686528255af9c031485683b8 (patch) | |
tree | ade3dcf168e5bf700154228044d588615e991975 /spec/helpers/refinery | |
parent | a8b5bce609089af8795768230c7dd3a9b87cd5e0 (diff) | |
parent | d891009d8b26cbccfc7fcdec645e1e2382c641bc (diff) | |
download | refinerycms-blog-249af183145b1608686528255af9c031485683b8.tar.gz refinerycms-blog-249af183145b1608686528255af9c031485683b8.tar.bz2 refinerycms-blog-249af183145b1608686528255af9c031485683b8.zip |
Merge branch 'master' into rails4
Conflicts:
app/helpers/refinery/blog/controller_helper.rb
app/models/refinery/blog/post.rb
Diffstat (limited to 'spec/helpers/refinery')
-rw-r--r-- | spec/helpers/refinery/blog/controller_helper_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/helpers/refinery/blog/controller_helper_spec.rb b/spec/helpers/refinery/blog/controller_helper_spec.rb new file mode 100644 index 0000000..732f2bd --- /dev/null +++ b/spec/helpers/refinery/blog/controller_helper_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +module Refinery + module Blog + describe ControllerHelper do + describe "#find_tags" do + let(:tags) { helper.find_tags } + + context "with draft posts" do + let!(:blog_post) { FactoryGirl.create(:blog_post, :draft => true, :tag_list => "first, second" ) } + + it "does not return tags" do + expect(tags).to be_empty + end + end + + context "with live posts" do + let!(:blog_post) { FactoryGirl.create(:blog_post, :tag_list => "first, second" ) } + + it "does return tags" do + expect(tags).to_not be_empty + end + end + end + end + end +end |