Skip to content

Commit c8c8e99

Browse files
committed
Modernize tests definition
1 parent 4efbb6b commit c8c8e99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/integration/provider/signups_controller_integration_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Provider::SignupsControllerStrongPasswordsTest < ActionDispatch::Integrati
104104
STRONG_PASSWORD = 'superSecret1234#'
105105
WEAK_PASSWORD = 'weakpwd'
106106

107-
def setup
107+
setup do
108108
host! master_account.external_admin_domain
109109
end
110110

@@ -117,7 +117,7 @@ def signup_params(password)
117117
}
118118
end
119119

120-
def test_weak_password_rejected_when_strong_passwords_enabled
120+
test 'weak password rejected when strong passwords enabled' do
121121
assert_no_difference(master_account.buyer_accounts.method(:count)) do
122122
post provider_signup_path, params: signup_params(WEAK_PASSWORD)
123123
end
@@ -126,15 +126,15 @@ def test_weak_password_rejected_when_strong_passwords_enabled
126126
assert_match "is too short (minimum is 15 characters)", response.body
127127
end
128128

129-
def test_strong_password_accepted_when_strong_passwords_enabled
129+
test 'strong password accepted when strong passwords enabled' do
130130
assert_difference(master_account.buyer_accounts.method(:count)) do
131131
post provider_signup_path, params: signup_params(STRONG_PASSWORD)
132132
end
133133

134134
assert_redirected_to success_provider_signup_path
135135
end
136136

137-
def test_weak_password_accepted_when_strong_passwords_disabled
137+
test 'weak password accepted when strong passwords disabled' do
138138
Rails.configuration.three_scale.stubs(:strong_passwords_disabled).returns(true)
139139

140140
assert_difference(master_account.buyer_accounts.method(:count)) do

0 commit comments

Comments
 (0)