@AntonKhorev commented on this pull request.


> +      get user_block_path(block)
+      assert_response :success
+      block.reload
+      assert_not block.needs_view
+      assert_equal Time.now.utc - 1.hour, block.deactivates_at
+    end
+  end
+
+  ##
+  # test clearing needs_view by showing a timed block to the blocked user
+  def test_show_sets_deactivates_at_for_timed_block
+    user = create(:user)
+    session_for(user)
+
+    freeze_time do
+      block = create(:user_block, :needs_view, :created_at => Time.now.utc, 
:ends_at => Time.now.utc + 1.day, :user => user)

updated, but if it's actually an issue, `test/factories/user_blocks.rb` still 
uses days

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5312#discussion_r1838884712
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/5312/review/2430873...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to