diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-07-15 20:15:10 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-07-23 12:48:23 +0300 |
commit | 1f403720293393f0f0bf6f99476abe4ba79580a4 (patch) | |
tree | 6d91fecc92f3807c486d9a380abdc4aae2a17bec /spec/controllers/import | |
parent | 96277bb9d61b5aaf5c2edc388c5eabfc743478f0 (diff) |
Do not authorize with OAuth for CICD only projects
Diffstat (limited to 'spec/controllers/import')
-rw-r--r-- | spec/controllers/import/github_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/import/github_controller_spec.rb b/spec/controllers/import/github_controller_spec.rb index 059354870b5..5675798ac33 100644 --- a/spec/controllers/import/github_controller_spec.rb +++ b/spec/controllers/import/github_controller_spec.rb @@ -33,6 +33,16 @@ describe Import::GithubController do expect(response).to have_http_status(200) end + + context 'when importing a CI/CD project' do + it 'always prompts for an access token' do + allow(controller).to receive(:github_import_configured?).and_return(true) + + get :new, params: { ci_cd_only: true } + + expect(response).to render_template(:new) + end + end end describe "GET callback" do |