[openstreetmap/openstreetmap-website] Allow to agree to new terms if already agreed to old terms (PR #5706)

Anton Khorev notifications at github.com
Fri Jul 11 16:46:41 UTC 2025


@AntonKhorev commented on this pull request.



> +      session_for(user)
+
+      freeze_time do
+        put account_terms_path, :params => { :referer => "/test", :read_ct => 1, :read_tou => 1 }
+
+        assert_redirected_to "/test"
+        assert_equal "Thanks for accepting the new contributor terms!", flash[:notice]
+
+        user.reload
+        assert user.terms_seen
+        assert_equal Time.now.utc, user.terms_agreed
+        assert_equal Time.now.utc, user.tou_agreed
+      end
+    end
+
+    def test_update_previously_accepted

Added more decline tests: (previously not accepted, previously accepted) x (by clicking *Cancel*, by submitting without checked boxes[^1])

[^1]: normally not possible if javascript is working correctly

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

Message ID: <openstreetmap/openstreetmap-website/pull/5706/review/3011123210 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250711/ac488811/attachment.htm>


More information about the rails-dev mailing list