summaryrefslogtreecommitdiff
path: root/spec/requests/api/invitations_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/invitations_spec.rb')
-rw-r--r--spec/requests/api/invitations_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/requests/api/invitations_spec.rb b/spec/requests/api/invitations_spec.rb
index f9f03c9e55c..76a4548df8a 100644
--- a/spec/requests/api/invitations_spec.rb
+++ b/spec/requests/api/invitations_spec.rb
@@ -152,6 +152,20 @@ RSpec.describe API::Invitations do
end
end
+ context 'with areas_of_focus', :snowplow do
+ it 'tracks the areas_of_focus from params' do
+ post invitations_url(source, maintainer),
+ params: { email: email, access_level: Member::DEVELOPER, areas_of_focus: 'Other' }
+
+ expect_snowplow_event(
+ category: 'Members::InviteService',
+ action: 'area_of_focus',
+ label: 'Other',
+ property: source.members.last.id.to_s
+ )
+ end
+ end
+
context 'with invite_source considerations', :snowplow do
let(:params) { { email: email, access_level: Member::DEVELOPER } }