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

Tom Hughes notifications at github.com
Fri Jul 4 18:25:01 UTC 2025


@tomhughes requested changes 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

We should probably have `test_decline_previously_accepted` to check that the dates don't change if you decline when revisiting the terms.

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

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


More information about the rails-dev mailing list