From f0ee9f49c9db63d3f82c46796a209df3c18a048b Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Wed, 11 Nov 2015 17:03:37 -0300 Subject: [PATCH] before deleting breakpoints --- plugins/serpro_captcha/test/unit/serpro_captcha_verification_test.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/serpro_captcha/test/unit/serpro_captcha_verification_test.rb b/plugins/serpro_captcha/test/unit/serpro_captcha_verification_test.rb index af6dd2c..60d0df0 100644 --- a/plugins/serpro_captcha/test/unit/serpro_captcha_verification_test.rb +++ b/plugins/serpro_captcha/test/unit/serpro_captcha_verification_test.rb @@ -90,14 +90,19 @@ class SerproCaptchaVerificationTest < ActiveSupport::TestCase end should 'perform a vote on an article identified by id' do - login_with_captcha + binding.pry + pass_captcha @environment.serpro_captcha_verify_uri, @captcha_verification_body + params = {} + params[:txtToken_captcha_serpro_gov_br]= @captcha_token + params[:captcha_text]= @captcha_text + post "/api/v1/login-captcha?#{params.to_query}" + json = JSON.parse(last_response.body) article = create_article('Article 1') params = {} + params[:private_token] = json['private_token'] params[:value] = 1 - post "/api/v1/articles/#{article.id}/vote?#{params.to_query}" json = JSON.parse(last_response.body) - assert_not_equal 401, last_response.status assert_equal true, json['vote'] end -- libgit2 0.21.2