]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Format closed_at correctly in changeset API responses
[rails.git] / test / controllers / site_controller_test.rb
index c4e1a5a66309bfc96ddaec3244c8e649cad60002..a2ea86f6f661c2c469a3c472dab5c197739e4c6b 100644 (file)
@@ -4,8 +4,8 @@ class SiteControllerTest < ActionController::TestCase
   ##
   # setup oauth keys
   def setup
-    Object.const_set("ID_KEY", create(:client_application).key)
-    Object.const_set("POTLATCH2_KEY", create(:client_application).key)
+    Settings.id_key = create(:client_application).key
+    Settings.potlatch2_key = create(:client_application).key
 
     stub_hostip_requests
   end
@@ -13,8 +13,8 @@ class SiteControllerTest < ActionController::TestCase
   ##
   # clear oauth keys
   def teardown
-    Object.send("remove_const", "ID_KEY")
-    Object.send("remove_const", "POTLATCH2_KEY")
+    Settings.id_key = nil
+    Settings.potlatch2_key = nil
   end
 
   ##
@@ -173,7 +173,7 @@ class SiteControllerTest < ActionController::TestCase
     get :edit, :session => { :user => create(:user) }
     assert_response :success
     assert_template "edit"
-    assert_template :partial => "_#{DEFAULT_EDITOR}", :count => 1
+    assert_template :partial => "_#{Settings.default_editor}", :count => 1
   end
 
   # Test the right editor gets used when the user has set a preference