Commit b174e8d4ccde82e03dfcf8ab4fcbc92a4aab2200
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api_captcha_with_frontend_console_feedback' into api
* api_captcha_with_frontend_console_feedback: Fix test Will not output garbage to the test screen
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
lib/noosfero/api/helpers.rb
... | ... | @@ -250,7 +250,7 @@ require 'grape' |
250 | 250 | log_msg = "#{status}, User message: #{user_message}" |
251 | 251 | log_msg = "#{log_message}, #{log_msg}" if log_message.present? |
252 | 252 | log_msg = "#{log_msg}, Javascript Console Message: #{javascript_console_message}" if javascript_console_message.present? |
253 | - logger.error log_msg | |
253 | + logger.error log_msg unless Rails.env.test? | |
254 | 254 | if javascript_console_message.present? |
255 | 255 | error!(message_hash, status) |
256 | 256 | else | ... | ... |
test/unit/api/users_test.rb
... | ... | @@ -29,7 +29,7 @@ class UsersTest < ActiveSupport::TestCase |
29 | 29 | params[:user] = {:login => 'some', :password => '123456', :password_confirmation => '123456', :email => 'some@some.com'} |
30 | 30 | post "/api/v1/users?#{params.to_query}" |
31 | 31 | json = JSON.parse(last_response.body) |
32 | - assert_equal 'Username / Email já está em uso,e-Mail já está em uso', json['message'] | |
32 | + assert_equal 'Username / Email já está em uso,e-Mail já está em uso', json['error'] | |
33 | 33 | end |
34 | 34 | |
35 | 35 | should 'return 400 status for invalid user creation' do | ... | ... |