aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-10-17 14:04:58 +0100
committerLouise Crow <louise.crow@gmail.com>2012-10-17 14:04:58 +0100
commita4927fc05a710cee6217d8a40ce925d5f894fd8f (patch)
tree83909e1d903afbf49d50182af79a679442632975 /spec/controllers/request_controller_spec.rb
parentcc27fe66a13fe1504711c64ce5530a1c178e907d (diff)
parentcc7bc36d5748c9baa0cfd8e44395923cc5792f32 (diff)
Merge branch 'release/0.6.7' into wdtk
Conflicts: config/general.yml-example
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 95737a250..77f43b618 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -238,6 +238,22 @@ describe RequestController, "when showing one request" do
response.should have_tag('div#owner_actions')
end
+ describe 'when the request does allow comments' do
+ it 'should have a comment link' do
+ get :show, { :url_title => 'why_do_you_have_such_a_fancy_dog' },
+ { :user_id => users(:admin_user).id }
+ response.should have_tag('#anyone_actions', /Add an annotation/)
+ end
+ end
+
+ describe 'when the request does not allow comments' do
+ it 'should not have a comment link' do
+ get :show, { :url_title => 'spam_1' },
+ { :user_id => users(:admin_user).id }
+ response.should_not have_tag('#anyone_actions', /Add an annotation/)
+ end
+ end
+
describe 'when the request is being viewed by an admin' do
describe 'if the request is awaiting description' do