Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added routing specs

  • Loading branch information...
commit 18f5e9ff7df1ece4035f4ed3c25277e5eea8b53e 1 parent 6a5aba0
@jokklan jokklan authored simi committed
View
10 spec/requests/refinery/admin/settings_spec.rb
@@ -18,10 +18,6 @@ module Admin
end
end
- it "should be accessible" do
- expect(:get => "/refinery/settings").to be_routable
- end
-
context "when no settings" do
before(:each) { Refinery::Setting.destroy_all }
@@ -74,7 +70,7 @@ module Admin
context "when interface config is disabled" do
before do
Refinery::Settings.stub(:enable_interface).and_return(false)
- Refinery::Plugins.registered.find_by_name("refinery_settings").hide_from_menu.stub(:enable_interface).and_return(true)
+ Refinery::Plugins.registered.find_by_name("refinery_settings").hide_from_menu = true
end
it "does not show up in menu" do
@@ -84,10 +80,6 @@ module Admin
page.should_not have_content "Settings"
end
end
-
- it "should not be accessible" do
- expect(:get => "/refinery/settings").not_to be_routable
- end
end
View
16 spec/routing/settings_routing_spec.rb
@@ -0,0 +1,16 @@
+require "spec_helper"
+
+
+describe "routes for refinery settings", :focus do
+
+ context "when interface config is disabled", :focus do
+ before do
+ Refinery::Settings.stub(:enable_interface).and_return(false)
+ Refinery::Plugins.registered.find_by_name("refinery_settings").hide_from_menu = true
+ end
+
+ it "should not be accesible" do
+ expect(:get => "/refinery/settings").to_not be_routable
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.