aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2011-12-15 17:27:18 -0800
committerPete Higgins <pete@peterhiggins.org>2011-12-15 17:27:18 -0800
commit8cc819aeed461da046af5bb120f6cd58c9299aa3 (patch)
tree5833604ae953ccb5f5d05ed428ba254924960062
parent7c63d8188e6f22e1a3224d30a7a6da10a36ba93c (diff)
downloadrefinerycms-blog-8cc819aeed461da046af5bb120f6cd58c9299aa3.tar.gz
refinerycms-blog-8cc819aeed461da046af5bb120f6cd58c9299aa3.tar.bz2
refinerycms-blog-8cc819aeed461da046af5bb120f6cd58c9299aa3.zip
Fix tab highlighting in admin interface.
-rw-r--r--lib/refinery/blog/engine.rb2
-rw-r--r--spec/requests/refinery/admin/menu_spec.rb13
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/refinery/blog/engine.rb b/lib/refinery/blog/engine.rb
index 3c829ca..b949265 100644
--- a/lib/refinery/blog/engine.rb
+++ b/lib/refinery/blog/engine.rb
@@ -14,7 +14,7 @@ module Refinery
plugin.pathname = root
plugin.name = "refinerycms_blog"
plugin.url = app.routes.url_helpers.refinery_admin_blog_posts_path
- plugin.menu_match = /^\/refinery\/blog\/?(posts|comments|categories)?/
+ plugin.menu_match = /refinery\/blog\/?(posts|comments|categories)?/
plugin.activity = {
:class_name => :'refinery/blog/post'
}
diff --git a/spec/requests/refinery/admin/menu_spec.rb b/spec/requests/refinery/admin/menu_spec.rb
new file mode 100644
index 0000000..b02a473
--- /dev/null
+++ b/spec/requests/refinery/admin/menu_spec.rb
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe "Blog menu entry" do
+ login_refinery_user
+
+ it "is highlighted when managing the blog" do
+ visit refinery_admin_root_path
+
+ within("#menu") { click_link "Blog" }
+
+ page.should have_css("a.active", :text => "Blog")
+ end
+end