]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/account_deletion_test.rb
Merge remote-tracking branch 'upstream/pull/5696'
[rails.git] / test / system / account_deletion_test.rb
index e6517dccc38b6bd0c5b17bb3463c5e34111bfdd3..729f9cccc620495276cb8c704664931b3fe8c4e4 100644 (file)
@@ -7,11 +7,11 @@ class AccountDeletionTest < ApplicationSystemTestCase
   end
 
   test "the status is deleted and the personal data removed" do
-    visit edit_account_path
+    visit account_path
 
-    click_link "Delete Account..."
+    click_on "Delete Account..."
     accept_confirm do
-      click_link "Delete Account"
+      click_on "Delete Account"
     end
 
     assert_current_path root_path
@@ -21,22 +21,22 @@ class AccountDeletionTest < ApplicationSystemTestCase
   end
 
   test "the user is signed out after deletion" do
-    visit edit_account_path
+    visit account_path
 
-    click_link "Delete Account..."
+    click_on "Delete Account..."
     accept_confirm do
-      click_link "Delete Account"
+      click_on "Delete Account"
     end
 
     assert_content "Log In"
   end
 
   test "the user is shown a confirmation flash message" do
-    visit edit_account_path
+    visit account_path
 
-    click_link "Delete Account..."
+    click_on "Delete Account..."
     accept_confirm do
-      click_link "Delete Account"
+      click_on "Delete Account"
     end
 
     assert_content "Account Deleted"
@@ -45,9 +45,9 @@ class AccountDeletionTest < ApplicationSystemTestCase
   test "can delete with any delay setting value if the user has no changesets" do
     with_user_account_deletion_delay(10000) do
       travel 1.hour do
-        visit edit_account_path
+        visit account_path
 
-        click_link "Delete Account..."
+        click_on "Delete Account..."
 
         assert_no_content "cannot currently be deleted"
       end
@@ -59,9 +59,9 @@ class AccountDeletionTest < ApplicationSystemTestCase
       create(:changeset, :user => @user)
 
       travel 1.hour do
-        visit edit_account_path
+        visit account_path
 
-        click_link "Delete Account..."
+        click_on "Delete Account..."
 
         assert_no_content "cannot currently be deleted"
       end
@@ -73,9 +73,9 @@ class AccountDeletionTest < ApplicationSystemTestCase
       create(:changeset, :user => @user, :created_at => Time.now.utc, :closed_at => Time.now.utc + 1.hour)
 
       travel 12.hours do
-        visit edit_account_path
+        visit account_path
 
-        click_link "Delete Account..."
+        click_on "Delete Account..."
 
         assert_no_content "cannot currently be deleted"
       end
@@ -87,9 +87,9 @@ class AccountDeletionTest < ApplicationSystemTestCase
       create(:changeset, :user => @user, :created_at => Time.now.utc, :closed_at => Time.now.utc + 1.hour)
 
       travel 10.hours do
-        visit edit_account_path
+        visit account_path
 
-        click_link "Delete Account..."
+        click_on "Delete Account..."
 
         assert_content "cannot currently be deleted"
         assert_content "in about 1 hour"