From 47579e24f3f9f29d5b8093f54e6958fefd7f2057 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 27 May 2020 21:08:05 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/features/oauth_provider_authorize_spec.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spec/features/oauth_provider_authorize_spec.rb (limited to 'spec/features/oauth_provider_authorize_spec.rb') diff --git a/spec/features/oauth_provider_authorize_spec.rb b/spec/features/oauth_provider_authorize_spec.rb new file mode 100644 index 00000000000..284fe3b0af9 --- /dev/null +++ b/spec/features/oauth_provider_authorize_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'OAuth Provider' do + describe 'Standard OAuth Authorization' do + let(:application) { create(:oauth_application, scopes: 'read_user') } + + before do + sign_in(user) + + visit oauth_authorization_path(client_id: application.uid, + redirect_uri: application.redirect_uri.split.first, + response_type: 'code', + state: 'my_state', + scope: 'read_user') + end + + it_behaves_like 'Secure OAuth Authorizations' + end +end -- cgit v1.2.3