X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/323b7032baf2cb664dbdf80b22e2edce5632fb09..93a9f31bf0e1cd3d5aec478aeef65c8132b02bdd:/test/controllers/user_blocks_controller_test.rb?ds=inline diff --git a/test/controllers/user_blocks_controller_test.rb b/test/controllers/user_blocks_controller_test.rb index d28194fdc..e6782a64d 100644 --- a/test/controllers/user_blocks_controller_test.rb +++ b/test/controllers/user_blocks_controller_test.rb @@ -13,10 +13,6 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest { :path => "/user_blocks", :method => :get }, { :controller => "user_blocks", :action => "index" } ) - assert_routing( - { :path => "/user_blocks/new", :method => :get }, - { :controller => "user_blocks", :action => "new" } - ) assert_routing( { :path => "/user_blocks", :method => :post }, { :controller => "user_blocks", :action => "create" } @@ -799,6 +795,8 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest end def check_inactive_block_updates(block) + original_ends_at = block.ends_at + put user_block_path(block, :user_block_period => "0", :user_block => { :needs_view => false, :reason => "Updated Reason" }) @@ -807,6 +805,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest block.reload assert_not_predicate block, :active? assert_equal "Updated Reason", block.reason + assert_equal original_ends_at, block.ends_at put user_block_path(block, :user_block_period => "0", @@ -816,6 +815,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest block.reload assert_not_predicate block, :active? assert_equal "Updated Reason", block.reason + assert_equal original_ends_at, block.ends_at put user_block_path(block, :user_block_period => "1", @@ -825,6 +825,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest block.reload assert_not_predicate block, :active? assert_equal "Updated Reason", block.reason + assert_equal original_ends_at, block.ends_at put user_block_path(block, :user_block_period => "0", @@ -834,6 +835,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest block.reload assert_not_predicate block, :active? assert_equal "Updated Reason Again", block.reason + assert_equal original_ends_at, block.ends_at end def check_user_blocks_table(user_blocks)