Files
fizzy/test/controllers/accounts/settings_controller_test.rb
T
David Heinemeier Hansson 76c87f6b67 Test updating account settings
2025-11-02 16:04:51 +01:00

19 lines
429 B
Ruby

require "test_helper"
class Account::SettingsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "show" do
get account_settings_path
assert_response :success
end
test "update" do
put account_settings_path, params: { account: { name: "New Account Name" }}
assert_equal "New Account Name", Account.sole.name
assert_redirected_to account_settings_path
end
end