X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a968c1b9237ea05ea1675007ba962240d8d4535a..f4369334333a5444492c616ac32cc3b842f6a7ad:/test/controllers/api/user_preferences_controller_test.rb diff --git a/test/controllers/api/user_preferences_controller_test.rb b/test/controllers/api/user_preferences_controller_test.rb index bf36c5d44..3d3f79712 100644 --- a/test/controllers/api/user_preferences_controller_test.rb +++ b/test/controllers/api/user_preferences_controller_test.rb @@ -9,6 +9,10 @@ module Api { :path => "/api/0.6/user/preferences", :method => :get }, { :controller => "api/user_preferences", :action => "index" } ) + assert_routing( + { :path => "/api/0.6/user/preferences.json", :method => :get }, + { :controller => "api/user_preferences", :action => "index", :format => "json" } + ) assert_routing( { :path => "/api/0.6/user/preferences", :method => :put }, { :controller => "api/user_preferences", :action => "update_all" } @@ -71,6 +75,7 @@ module Api js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal 2, js["preferences"].count + assert_equal user_preference.v, js["preferences"][user_preference.k] end ##