Skip to content

Commit

Permalink
第23回 追加したメソッドのテストひな形を作成
Browse files Browse the repository at this point in the history
  • Loading branch information
juno-nishizaki authored and Redmine Patch Meetup committed Mar 24, 2023
1 parent fbf0c12 commit 1a79357
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions test/unit/mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ def test_message_posted_message_id
end
end

def test_message_posted_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_reply_posted_message_id
set_tmp_attachments_directory
message = Message.find(3)
Expand Down Expand Up @@ -703,6 +707,12 @@ def test_document_added_should_include_recipients_on_mail_footer
end
end

def test_documents_file_added_should_include_recipients_on_mail_footer
# def test_attachments_added_should_include_recipients_on_mail_footer
# Mailer.deliver_attachments_added(document, author)
flunk 'Not Implemented'
end

def test_issue_should_send_email_notification_with_suppress_empty_fields
ActionMailer::Base.deliveries.clear
with_settings :notified_events => %w(issue_added) do
Expand Down Expand Up @@ -753,6 +763,11 @@ def test_version_file_added
end
end

def test_version_file_added_should_include_recipients_on_mail_footer
# def test_attachments_added_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_project_file_added
attachements = [Attachment.find_by_container_type('Project')]
assert Mailer.deliver_attachments_added(attachements)
Expand All @@ -763,6 +778,11 @@ def test_project_file_added
end
end

def test_project_file_added_should_include_recipients_on_mail_footer
# def test_attachments_added_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_news_added_should_notify_project_news_watchers
set_tmp_attachments_directory
user1 = User.generate!
Expand All @@ -787,6 +807,14 @@ def test_news_added_should_notify_project_news_watchers
end
end

def test_news_added_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_news_comments_added_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_wiki_content_added
content = WikiContent.find(1)
assert_difference 'ActionMailer::Base.deliveries.size', 2 do
Expand All @@ -813,6 +841,10 @@ def test_wiki_content_added_should_notify_mentioned_users_in_content
assert_include User.find(1).mail, recipients
end

def test_wiki_content_added_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_wiki_content_updated
content = WikiContent.find(1)
assert Mailer.deliver_wiki_content_updated(content)
Expand All @@ -838,6 +870,10 @@ def test_wiki_content_updated_should_notify_mentioned_users_in_updated_content
assert_include User.find(1).mail, recipients
end

def test_wiki_content_updated_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_register
token = Token.find(1)
assert Mailer.deliver_register(token.user, token)
Expand All @@ -848,6 +884,10 @@ def test_register
end
end

def test_account_activation_request_should_include_recipients_on_mail_footer
flunk 'Not Implemented'
end

def test_test_email_later
user = User.find(1)
assert Mailer.test_email(user).deliver_later
Expand Down Expand Up @@ -1091,6 +1131,16 @@ def test_security_notification_should_include_link
end
end

def test_security_notification_should_include_recipients_on_mail_footer
# 管理者を追加削除すると送信される
flunk 'Not Implemented'
end

def test_settings_updated_should_include_recipients_on_mail_footer
# リポジトリを変えると送信される
flunk 'Not Implemented'
end

def test_mailer_should_not_change_locale
# Set current language to italian
set_language_if_valid 'it'
Expand Down

0 comments on commit 1a79357

Please sign in to comment.