-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
142 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Users::CancellationsController < ApplicationController | ||
def show | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<% title t(".title") %> | ||
|
||
<%= render(PageLayouts::Settings::Component.new( | ||
title: t(".title"), | ||
description: t(".description") | ||
)) do %> | ||
<div class="box"> | ||
<header class="border-b pb-4 mb-4"> | ||
<h3 class="font-bold text-primary uppercase"><%= t(".box_title") %></h3> | ||
</header> | ||
<article class="prose"> | ||
<p><%= t(".content") %></p> | ||
<%= button_to t(".submit"), user_registration_path, name: "commit", class:"kiqr-button", data: { confirm: t(".confirmation_message"), turbo_confirm: t(".confirmation_message") }, method: :delete %> | ||
</article> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<% title t(".title") %> | ||
|
||
<%= render(PageLayouts::Settings::Component.new( | ||
title: t(".title"), | ||
description: t(".description") | ||
)) do %> | ||
|
||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= f.input :email, placeholder: t(".form.email.placeholder"), required: true, autofocus: true %> | ||
|
||
<div class="flex flex-col lg:flex-row justify-between items-start gap-4"> | ||
<%= f.input :password, placeholder: t(".form.password.placeholder"), required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" } %> | ||
<%= f.input :password_confirmation, placeholder: t(".form.password_confirmation.placeholder"), required: true, input_html: { autocomplete: "new-password" } %> | ||
</div> | ||
|
||
<%= f.input :current_password, placeholder: t(".form.current_password.placeholder"), hint: t(".form.current_password.hint"), required: true, input_html: { autocomplete: "current-password" } %> | ||
|
||
<div class="mt-4 flex justify-between items-center"> | ||
<%= f.button :submit, t(".form.submit_button") %> | ||
</div> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "application_system_test_case" | ||
|
||
class EditAccountsTest < ApplicationSystemTestCase | ||
test "can delete a fresh user" do | ||
user = create(:user) | ||
sign_in(user) | ||
visit delete_user_registration_path | ||
accept_confirm { click_on "commit" } | ||
|
||
assert_text I18n.t("devise.registrations.destroyed") | ||
assert_nil User.find_by_id(user.id) | ||
end | ||
|
||
test "can't delete a user if they're an owner of a team" do | ||
skip("https://github.com/kiqr/kiqr/issues/1") | ||
end | ||
|
||
test "can't delete a user if theres an active subscription on their personal account" do | ||
skip("https://github.com/kiqr/kiqr/issues/1") | ||
end | ||
end |
File renamed without changes.