From f9d3d4d2529120fecf76a05f9a4453ba2828aae0 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 11 Jul 2013 17:17:00 -0300 Subject: [PATCH] Testing no captcha for the admin to register abuse --- test/functional/profile_controller_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index 156c36c..3e31b06 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -1254,6 +1254,18 @@ class ProfileControllerTest < ActionController::TestCase end end + should 'not ask admin for captcha to register abuse' do + reported = fast_create(Profile) + login_as(profile.identifier) + environment = Environment.default + environment.add_admin(profile) + @controller.expects(:verify_recaptcha).never + + assert_difference AbuseReport, :count, 1 do + post :register_report, :profile => reported.identifier, :abuse_report => {:reason => 'some reason'} + end + end + should 'display activities and scraps together' do another_person = fast_create(Person) Scrap.create!(defaults_for_scrap(:sender => another_person, :receiver => profile, :content => 'A scrap')) -- libgit2 0.21.2