diff options
author | Pete Higgins <pete@peterhiggins.org> | 2012-01-08 13:52:44 -0800 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2012-01-08 13:52:44 -0800 |
commit | 63b0bec5ff625738ce0072f41fd05439dcd08d0e (patch) | |
tree | 0d2560b857aede1836a8f437a0d89d03730694ac /spec/lib | |
parent | e3e5bcffc3f7ddb744054feee0d7934e4cdc053e (diff) | |
download | refinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.tar.gz refinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.tar.bz2 refinerycms-blog-63b0bec5ff625738ce0072f41fd05439dcd08d0e.zip |
Make DB seed idempotent.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/refinery/blog/engine_spec.rb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/spec/lib/refinery/blog/engine_spec.rb b/spec/lib/refinery/blog/engine_spec.rb index 5b36fd8..1c44da7 100644 --- a/spec/lib/refinery/blog/engine_spec.rb +++ b/spec/lib/refinery/blog/engine_spec.rb @@ -3,12 +3,23 @@ require 'spec_helper' module Refinery module Blog describe Engine do - let(:activity) do - Refinery::Plugins.registered.find_by_name("refinerycms_blog").activity.first + describe "plugin activity" do + let(:activity) do + Refinery::Plugins.registered.find_by_name("refinerycms_blog").activity.first + end + + it "sets the correct path for activity entries" do + activity.url.should eq("edit_refinery_admin_blog_posts_path") + end end - it "sets the correct path for activity entries" do - activity.url.should eq("edit_refinery_admin_blog_posts_path") + describe ".load_seed" do + it "is idempotent" do + Refinery::Blog::Engine.load_seed + Refinery::Blog::Engine.load_seed + + Refinery::Page.where(:link_url => '/blog').count.should eq(1) + end end end end |