aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2012-01-24 20:38:05 -0800
committerPhilip Arndt <parndt@gmail.com>2012-01-24 20:38:05 -0800
commit5eab0be3405fd170e79d9cf46c99c68acf1899f8 (patch)
tree9aa07c0afb58ddd5032b2fea35a79c602a21363a
parentea2f177b0da4a86ca7e9959ae4eb16f99bea6ebf (diff)
parent492fd663ca22b92ece6f17a0c9e4ba21a4fef27b (diff)
downloadrefinerycms-blog-5eab0be3405fd170e79d9cf46c99c68acf1899f8.tar.gz
refinerycms-blog-5eab0be3405fd170e79d9cf46c99c68acf1899f8.tar.bz2
refinerycms-blog-5eab0be3405fd170e79d9cf46c99c68acf1899f8.zip
Merge pull request #182 from substantial/fix_category_creation
Fix category creation which fixes #179
-rw-r--r--app/views/refinery/blog/admin/categories/_form.html.erb2
-rw-r--r--spec/requests/refinery/blog/admin/categories_spec.rb20
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