1 require File.dirname(__FILE__) + '/../test_helper'
3 class UserPreferenceControllerTest < ActionController::TestCase
4 fixtures :users, :user_preferences
7 # first try without auth
9 assert_response :unauthorized, "should be authenticated"
12 basic_authorization("test@openstreetmap.org", "test")
15 assert_response :success
16 assert_select "osm" do
17 assert_select "preferences", :count => 1 do
18 assert_select "preference", :count => 2
19 assert_select "preference[k=\"#{user_preferences(:a).k}\"][v=\"#{user_preferences(:a).v}\"]", :count => 1
20 assert_select "preference[k=\"#{user_preferences(:two).k}\"][v=\"#{user_preferences(:two).v}\"]", :count => 1