diff options
author | Pete Higgins <pete@peterhiggins.org> | 2012-01-24 20:12:45 -0800 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2012-01-24 20:12:45 -0800 |
commit | 492fd663ca22b92ece6f17a0c9e4ba21a4fef27b (patch) | |
tree | 9aa07c0afb58ddd5032b2fea35a79c602a21363a | |
parent | ea2f177b0da4a86ca7e9959ae4eb16f99bea6ebf (diff) | |
download | refinerycms-blog-492fd663ca22b92ece6f17a0c9e4ba21a4fef27b.tar.gz refinerycms-blog-492fd663ca22b92ece6f17a0c9e4ba21a4fef27b.tar.bz2 refinerycms-blog-492fd663ca22b92ece6f17a0c9e4ba21a4fef27b.zip |
Fix route helper in categories view.
-rw-r--r-- | app/views/refinery/blog/admin/categories/_form.html.erb | 2 | ||||
-rw-r--r-- | spec/requests/refinery/blog/admin/categories_spec.rb | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/app/views/refinery/blog/admin/categories/_form.html.erb b/app/views/refinery/blog/admin/categories/_form.html.erb index 90eed5d..3ad489f 100644 --- a/app/views/refinery/blog/admin/categories/_form.html.erb +++ b/app/views/refinery/blog/admin/categories/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for [main_app, :refinery_admin, @category] do |f| -%> +<%= form_for [main_app, :refinery_blog_admin, @category] do |f| -%> <%= render :partial => "/refinery/admin/error_messages", :locals => { :object => f.object, diff --git a/spec/requests/refinery/blog/admin/categories_spec.rb b/spec/requests/refinery/blog/admin/categories_spec.rb new file mode 100644 index 0000000..60a92ab --- /dev/null +++ b/spec/requests/refinery/blog/admin/categories_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "Categories admin" do + login_refinery_user + + let(:title) { "lol" } + + it "can create categories" do + visit refinery_admin_root_path + + within("nav#menu") { click_link "Blog" } + within("nav.multilist") { click_link "Create new category" } + + fill_in "Title", :with => title + click_button "Save" + + category = Refinery::Blog::Category.first + category.title.should eq(title) + end +end |