diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/support/matchers/email_matcher.rb | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/support/matchers/email_matcher.rb')
-rw-r--r-- | spec/support/matchers/email_matcher.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/support/matchers/email_matcher.rb b/spec/support/matchers/email_matcher.rb new file mode 100644 index 00000000000..36cf3e0e871 --- /dev/null +++ b/spec/support/matchers/email_matcher.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +RSpec::Matchers.define :have_text_part_content do |expected| + match do |actual| + @actual = actual.text_part.body.to_s + expect(@actual).to include(expected) + end + + diffable +end + +RSpec::Matchers.define :have_html_part_content do |expected| + match do |actual| + @actual = actual.html_part.body.to_s + expect(@actual).to include(expected) + end + + diffable +end |