Commit f9d3d4d2529120fecf76a05f9a4453ba2828aae0
1 parent
90af49b9
Exists in
master
and in
29 other branches
Testing no captcha for the admin to register abuse
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
test/functional/profile_controller_test.rb
| ... | ... | @@ -1254,6 +1254,18 @@ class ProfileControllerTest < ActionController::TestCase |
| 1254 | 1254 | end |
| 1255 | 1255 | end |
| 1256 | 1256 | |
| 1257 | + should 'not ask admin for captcha to register abuse' do | |
| 1258 | + reported = fast_create(Profile) | |
| 1259 | + login_as(profile.identifier) | |
| 1260 | + environment = Environment.default | |
| 1261 | + environment.add_admin(profile) | |
| 1262 | + @controller.expects(:verify_recaptcha).never | |
| 1263 | + | |
| 1264 | + assert_difference AbuseReport, :count, 1 do | |
| 1265 | + post :register_report, :profile => reported.identifier, :abuse_report => {:reason => 'some reason'} | |
| 1266 | + end | |
| 1267 | + end | |
| 1268 | + | |
| 1257 | 1269 | should 'display activities and scraps together' do |
| 1258 | 1270 | another_person = fast_create(Person) |
| 1259 | 1271 | Scrap.create!(defaults_for_scrap(:sender => another_person, :receiver => profile, :content => 'A scrap')) | ... | ... |