Merge pull request #2212 from internetee/added_notifications_for_acc_center

added mail contronller and job for notificate registrars and admins about accreditation expire date
This commit is contained in:
Timo Võhmar 2022-01-13 09:23:11 +02:00 committed by GitHub
commit 4ccbbd2292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 167 additions and 4 deletions

View file

@ -18,6 +18,7 @@ class ReppV1AccreditationResultsTest < ActionDispatch::IntegrationTest
json = JSON.parse(response.body, symbolize_names: true)
assert_response :ok
assert_emails 2
assert_equal json[:data][:user][:username], @user.username
assert_equal json[:data][:result], "true"
assert_equal json[:data][:message], "Accreditation info successfully added"
@ -31,6 +32,7 @@ class ReppV1AccreditationResultsTest < ActionDispatch::IntegrationTest
assert_response :unauthorized
assert_emails 0
assert_equal json[:code], 2202
assert_equal json[:message], 'Invalid authorization information'
end
@ -43,6 +45,7 @@ class ReppV1AccreditationResultsTest < ActionDispatch::IntegrationTest
assert_response :ok
assert_emails 0
assert_equal json[:code], 2303
assert_equal json[:message], "Object 'chungachanga' does not exist"
end