Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-23 12:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-23 12:10:03 +0300
commit65f7976d0cd11d91a4c0945b2c63a1aa2f888b07 (patch)
tree07a0e774b12b29352ca6b3bd87b108879ebb00b9 /spec/graphql/graphql_triggers_spec.rb
parent1165608bfd217a96e133487d6049a989a15789c4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql/graphql_triggers_spec.rb')
-rw-r--r--spec/graphql/graphql_triggers_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/graphql/graphql_triggers_spec.rb b/spec/graphql/graphql_triggers_spec.rb
new file mode 100644
index 00000000000..0b53c633077
--- /dev/null
+++ b/spec/graphql/graphql_triggers_spec.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe GraphqlTriggers do
+ describe '.issuable_assignees_updated' do
+ it 'triggers the issuableAssigneesUpdated subscription' do
+ assignees = create_list(:user, 2)
+ issue = create(:issue, assignees: assignees)
+
+ expect(GitlabSchema.subscriptions).to receive(:trigger).with(
+ 'issuableAssigneesUpdated',
+ { issuable_id: issue.to_gid },
+ issue
+ )
+
+ GraphqlTriggers.issuable_assignees_updated(issue)
+ end
+ end
+end