X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d4776b59a125152b298b206abe6c3dfdbe00afd8..bcd2592ce98dbf6798a9a1c28cf583ff327cabf5:/test/functional/user_preference_controller_test.rb?ds=inline diff --git a/test/functional/user_preference_controller_test.rb b/test/functional/user_preference_controller_test.rb index 871f9000b..32ece63cd 100644 --- a/test/functional/user_preference_controller_test.rb +++ b/test/functional/user_preference_controller_test.rb @@ -108,7 +108,7 @@ class UserPreferenceControllerTest < ActionController::TestCase end assert_response :success assert_equal "text/plain", @response.content_type - assert_equal " ", @response.body + assert_equal "", @response.body assert_equal "new_value", UserPreference.find(1, "key").v assert_equal "value", UserPreference.find(1, "new_key").v assert_raises ActiveRecord::RecordNotFound do @@ -120,9 +120,9 @@ class UserPreferenceControllerTest < ActionController::TestCase content "" put :update end - assert_response :not_acceptable + assert_response :bad_request assert_equal "text/plain", @response.content_type - assert_equal "OH NOES! CAN HAS UNIQUE KEYS?", @response.body + assert_equal "Duplicate preferences with key key", @response.body assert_equal "new_value", UserPreference.find(1, "key").v # try a put with invalid content @@ -156,7 +156,7 @@ class UserPreferenceControllerTest < ActionController::TestCase end assert_response :success assert_equal "text/plain", @response.content_type - assert_equal " ", @response.body + assert_equal "", @response.body assert_equal "new_value", UserPreference.find(1, "new_key").v # try changing the value of a preference @@ -166,7 +166,7 @@ class UserPreferenceControllerTest < ActionController::TestCase end assert_response :success assert_equal "text/plain", @response.content_type - assert_equal " ", @response.body + assert_equal "", @response.body assert_equal "newer_value", UserPreference.find(1, "new_key").v end @@ -189,7 +189,7 @@ class UserPreferenceControllerTest < ActionController::TestCase end assert_response :success assert_equal "text/plain", @response.content_type - assert_equal " ", @response.body + assert_equal "", @response.body assert_raises ActiveRecord::RecordNotFound do UserPreference.find(1, "key") end