Commit b6d92d258e37c6dbc32c71a2b07cc49dec085b50
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api' of gitlab.com:participa/noosfero into api
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
lib/noosfero/api/helpers.rb
... | ... | @@ -263,7 +263,7 @@ require 'grape' |
263 | 263 | log_msg = "#{status}, User message: #{user_message}" |
264 | 264 | log_msg = "#{log_message}, #{log_msg}" if log_message.present? |
265 | 265 | log_msg = "#{log_msg}, Javascript Console Message: #{javascript_console_message}" if javascript_console_message.present? |
266 | - logger.error log_msg | |
266 | + logger.error log_msg unless Rails.env.test? | |
267 | 267 | if javascript_console_message.present? |
268 | 268 | error!(message_hash, status) |
269 | 269 | 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 | ... | ... |