X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4469c9f5e599ab4dc2e92c9240d261c0ab25fbb7..3d3b2b47964ec91ef1ab1946b7258a06665caced:/test/system/account_pd_declaration_test.rb diff --git a/test/system/account_pd_declaration_test.rb b/test/system/account_pd_declaration_test.rb index 9471c28c1..d58484c8c 100644 --- a/test/system/account_pd_declaration_test.rb +++ b/test/system/account_pd_declaration_test.rb @@ -6,11 +6,30 @@ class AccountPdDeclarationTest < ApplicationSystemTestCase sign_in_as(@user) end - test "show checkbox if no declaration was made" do + test "can decline declaration if no declaration was made" do visit account_pd_declaration_path within_content_body do assert_unchecked_field "I consider my contributions to be in the Public Domain" + assert_button "Confirm" + + click_on "Confirm" + + assert_no_text "You have also declared that you consider your edits to be in the Public Domain." + end + end + + test "can confirm declaration if no declaration was made" do + visit account_pd_declaration_path + + within_content_body do + assert_unchecked_field "I consider my contributions to be in the Public Domain" + assert_button "Confirm" + + check "I consider my contributions to be in the Public Domain" + click_on "Confirm" + + assert_text "You have also declared that you consider your edits to be in the Public Domain." end end @@ -21,6 +40,7 @@ class AccountPdDeclarationTest < ApplicationSystemTestCase within_content_body do assert_checked_field "I consider my contributions to be in the Public Domain", :disabled => true + assert_button "Confirm", :disabled => true end end end