diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-19 09:56:46 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-19 09:56:46 +0000 |
commit | f286a6044be49b88b067f89072618aecc7164caa (patch) | |
tree | 6359dfe601c787be72932e98a862f5b99e98d11f /test | |
parent | 65a91d13a0ef8a08f2cb118ea0bda716910db6a9 (diff) | |
download | redmine-f286a6044be49b88b067f89072618aecc7164caa.tar.gz redmine-f286a6044be49b88b067f89072618aecc7164caa.zip |
Deprecate and rename rss_* methods to atom_* methods (#15118).
Patch by Mischa The Evil and Marius BÄ‚LTEANU
git-svn-id: http://svn.redmine.org/redmine/trunk@21467 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/journals_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/my_controller_test.rb | 18 | ||||
-rw-r--r-- | test/integration/application_test.rb | 4 | ||||
-rw-r--r-- | test/integration/routing/my_test.rb | 2 | ||||
-rw-r--r-- | test/unit/user_test.rb | 14 |
5 files changed, 20 insertions, 20 deletions
diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb index ac6b5c69e..b1d1ffc6c 100644 --- a/test/functional/journals_controller_test.rb +++ b/test/functional/journals_controller_test.rb @@ -94,7 +94,7 @@ class JournalsControllerTest < Redmine::ControllerTest :index, :params => { :format => 'atom', - :key => user.rss_key + :key => user.atom_key } ) @fields.each_with_index do |field, i| diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 8439115fc..a2442dc4d 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -787,22 +787,22 @@ class MyControllerTest < Redmine::ControllerTest User.find(2).pref.my_page_layout) end - def test_reset_rss_key_with_existing_key - @previous_token_value = User.find(2).rss_key # Will generate one if it's missing - post :reset_rss_key + def test_reset_atom_key_with_existing_key + @previous_token_value = User.find(2).atom_key # Will generate one if it's missing + post :reset_atom_key - assert_not_equal @previous_token_value, User.find(2).rss_key - assert User.find(2).rss_token + assert_not_equal @previous_token_value, User.find(2).atom_key + assert User.find(2).atom_token assert_match /reset/, flash[:notice] assert_redirected_to '/my/account' end - def test_reset_rss_key_without_existing_key + def test_reset_atom_key_without_existing_key Token.delete_all - assert_nil User.find(2).rss_token - post :reset_rss_key + assert_nil User.find(2).atom_token + post :reset_atom_key - assert User.find(2).rss_token + assert User.find(2).atom_token assert_match /reset/, flash[:notice] assert_redirected_to '/my/account' end diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index 28cd4aa8d..a4e2808a1 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -59,8 +59,8 @@ class ApplicationTest < Redmine::IntegrationTest get '/issues/4.atom' assert_response 302 - rss_key = User.find(2).rss_key - get "/issues/4.atom?key=#{rss_key}" + atom_key = User.find(2).atom_key + get "/issues/4.atom?key=#{atom_key}" assert_response 200 assert_nil session[:user_id] end diff --git a/test/integration/routing/my_test.rb b/test/integration/routing/my_test.rb index 2fdb53aad..bf6dfa4ae 100644 --- a/test/integration/routing/my_test.rb +++ b/test/integration/routing/my_test.rb @@ -33,7 +33,7 @@ class RoutingMyTest < Redmine::RoutingTest should_route 'GET /my/api_key' => 'my#show_api_key' should_route 'POST /my/api_key' => 'my#reset_api_key' - should_route 'POST /my/rss_key' => 'my#reset_rss_key' + should_route 'POST /my/atom_key' => 'my#reset_atom_key' should_route 'GET /my/password' => 'my#password' should_route 'POST /my/password' => 'my#password' diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 6590ce2f7..9e2b9be1a 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -798,19 +798,19 @@ class UserTest < ActiveSupport::TestCase assert_equal 1, anon2.errors.count end - def test_rss_key - assert_nil @jsmith.rss_token - key = @jsmith.rss_key + def test_atom_key + assert_nil @jsmith.atom_token + key = @jsmith.atom_key assert_equal 40, key.length @jsmith.reload - assert_equal key, @jsmith.rss_key + assert_equal key, @jsmith.atom_key end - def test_rss_key_should_not_be_generated_twice + def test_atom_key_should_not_be_generated_twice assert_difference 'Token.count', 1 do - key1 = @jsmith.rss_key - key2 = @jsmith.rss_key + key1 = @jsmith.atom_key + key2 = @jsmith.atom_key assert_equal key1, key2 end end |