dmails: allow site owner to read all mails.

Allow site owner to read dmails sent to other users. This is make it
easier to investigate spam without having to drop into the dev console.
This commit is contained in:
evazion
2020-12-13 21:35:18 -06:00
parent 2e633f84f6
commit eae3c1942d
2 changed files with 6 additions and 0 deletions

View File

@@ -99,6 +99,11 @@ class DmailsControllerTest < ActionDispatch::IntegrationTest
assert_response 403
end
should "show dmails to the site owner" do
get_auth dmail_path(@dmail), create(:owner_user)
assert_response :success
end
should "mark dmails as read" do
assert_equal(false, @dmail.is_read)
get_auth dmail_path(@dmail), @dmail.owner