diff options
author | Patrick Davey <patrick.davey@resolvedigital.co.nz> | 2013-10-17 08:55:13 +1300 |
---|---|---|
committer | Patrick Davey <patrick.davey@resolvedigital.co.nz> | 2013-10-17 08:55:51 +1300 |
commit | 32bc0bb0e3adb0a3ce025724b51b7d413a554e27 (patch) | |
tree | 7f34da0539a212a885294ded919d74cbaae75f91 /spec/helpers | |
parent | 5ae082d79e554d3449083aa70ef64ef5d677759a (diff) | |
download | refinerycms-blog-32bc0bb0e3adb0a3ce025724b51b7d413a554e27.tar.gz refinerycms-blog-32bc0bb0e3adb0a3ce025724b51b7d413a554e27.tar.bz2 refinerycms-blog-32bc0bb0e3adb0a3ce025724b51b7d413a554e27.zip |
Restricting tags to live posts
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/refinery/blog/controller_helper_spec.rb | 25 |
1 files changed, 25 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..89eeaad --- /dev/null +++ b/spec/helpers/refinery/blog/controller_helper_spec.rb @@ -0,0 +1,25 @@ +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) } + it "does not return tags" do + tags.should be_empty + end + end + + context "with live posts" do + let!(:blog_post) { FactoryGirl.create(:blog_post) } + + it "does not return tags" do + tags.should_not be_empty + end + end + end + end + end +end |