aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-01-06 14:55:47 +0000
committerLouise Crow <louise.crow@gmail.com>2015-04-28 09:07:16 +0100
commitf71658e9223f954177a5cacb8c7ad43605c264cd (patch)
tree2f8841418c7db9ff9535920d5ea7515200c9bb7a /spec/controllers
parent203d35713262ecfec4dfd44c3b080edcd3760750 (diff)
Don't show the widget pages for requests without normal prominence.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/widgets_controller_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/controllers/widgets_controller_spec.rb b/spec/controllers/widgets_controller_spec.rb
index 80c2d2f26..6a58c7c5c 100644
--- a/spec/controllers/widgets_controller_spec.rb
+++ b/spec/controllers/widgets_controller_spec.rb
@@ -61,6 +61,16 @@ describe WidgetsController do
end
+ context "when the request's prominence is not 'normal'" do
+
+ it 'should return a 403' do
+ @info_request.prominence = 'hidden'
+ @info_request.save!
+ get :show, :request_id => @info_request.id
+ response.code.should == "403"
+ end
+
+ end
end
@@ -91,6 +101,17 @@ describe WidgetsController do
end
+ context "when the request's prominence is not 'normal'" do
+
+ it 'should return a 403' do
+ @info_request.prominence = 'hidden'
+ @info_request.save!
+ get :show, :request_id => @info_request.id
+ response.code.should == "403"
+ end
+
+ end
+
end
describe :update do
@@ -143,6 +164,17 @@ describe WidgetsController do
end
+ context "when the request's prominence is not 'normal'" do
+
+ it 'should return a 403' do
+ @info_request.prominence = 'hidden'
+ @info_request.save!
+ get :show, :request_id => @info_request.id
+ response.code.should == "403"
+ end
+
+ end
+
end
end