diff options
Diffstat (limited to 'spec/requests/groups')
-rw-r--r-- | spec/requests/groups/email_campaigns_controller_spec.rb | 10 | ||||
-rw-r--r-- | spec/requests/groups/settings/applications_controller_spec.rb | 20 |
2 files changed, 29 insertions, 1 deletions
diff --git a/spec/requests/groups/email_campaigns_controller_spec.rb b/spec/requests/groups/email_campaigns_controller_spec.rb index 4d630ef6710..9ed828d1a9a 100644 --- a/spec/requests/groups/email_campaigns_controller_spec.rb +++ b/spec/requests/groups/email_campaigns_controller_spec.rb @@ -94,7 +94,7 @@ RSpec.describe Groups::EmailCampaignsController do describe 'track parameter' do context 'when valid' do - where(track: Namespaces::InProductMarketingEmailsService::TRACKS.keys.without(:experience)) + where(track: [Namespaces::InProductMarketingEmailsService::TRACKS.keys.without(:experience), Namespaces::InviteTeamEmailService::TRACK].flatten) with_them do it_behaves_like 'track and redirect' @@ -117,6 +117,10 @@ RSpec.describe Groups::EmailCampaignsController do with_them do it_behaves_like 'track and redirect' end + + it_behaves_like 'track and redirect' do + let(:track) { Namespaces::InviteTeamEmailService::TRACK.to_s } + end end context 'when invalid' do @@ -124,6 +128,10 @@ RSpec.describe Groups::EmailCampaignsController do with_them do it_behaves_like 'no track and 404' + + it_behaves_like 'no track and 404' do + let(:track) { Namespaces::InviteTeamEmailService::TRACK.to_s } + end end end end diff --git a/spec/requests/groups/settings/applications_controller_spec.rb b/spec/requests/groups/settings/applications_controller_spec.rb new file mode 100644 index 00000000000..74313491414 --- /dev/null +++ b/spec/requests/groups/settings/applications_controller_spec.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Groups::Settings::ApplicationsController do + let_it_be(:user) { create(:user) } + let_it_be(:group) { create(:group) } + let_it_be(:application) { create(:oauth_application, owner_id: group.id, owner_type: 'Namespace') } + let_it_be(:show_path) { group_settings_application_path(group, application) } + let_it_be(:create_path) { group_settings_applications_path(group) } + + before do + sign_in(user) + group.add_owner(user) + end + + include_examples 'applications controller - GET #show' + + include_examples 'applications controller - POST #create' +end |