mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Simplify self host settings controller (#1230)
This commit is contained in:
parent
cb75c537fe
commit
7fabca4679
22 changed files with 252 additions and 399 deletions
|
@ -1,23 +0,0 @@
|
|||
require "test_helper"
|
||||
|
||||
class AccountTest < ActiveSupport::TestCase
|
||||
test "#send_test_email return true if all smtp settings are populated" do
|
||||
Setting.smtp_host = "smtp.example.com"
|
||||
Setting.smtp_port = 466
|
||||
Setting.smtp_username = "user@example.com"
|
||||
Setting.smtp_password = "notification@example.com"
|
||||
Setting.email_sender = "password"
|
||||
|
||||
assert Setting.smtp_settings_populated?
|
||||
end
|
||||
|
||||
test "#send_test_email return false if one smtp settings is not populated" do
|
||||
Setting.smtp_host = ""
|
||||
Setting.smtp_port = 466
|
||||
Setting.smtp_username = "user@example.com"
|
||||
Setting.smtp_password = "notification@example.com"
|
||||
Setting.email_sender = "password"
|
||||
|
||||
assert_not Setting.smtp_settings_populated?
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue