summaryrefslogtreecommitdiff
path: root/qa/spec/support/matchers/have_assignee.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/support/matchers/have_assignee.rb')
-rw-r--r--qa/spec/support/matchers/have_assignee.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/qa/spec/support/matchers/have_assignee.rb b/qa/spec/support/matchers/have_assignee.rb
new file mode 100644
index 00000000000..5e7aa2162b2
--- /dev/null
+++ b/qa/spec/support/matchers/have_assignee.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Matchers
+ module HaveAssignee
+ RSpec::Matchers.define :have_assignee do |assignee|
+ match do |page_object|
+ page_object.has_assignee?(assignee)
+ end
+
+ match_when_negated do |page_object|
+ page_object.has_no_assignee?(assignee)
+ end
+ end
+ end
+end