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:
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