diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/routing/import_routing_spec.rb | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/routing/import_routing_spec.rb')
-rw-r--r-- | spec/routing/import_routing_spec.rb | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/spec/routing/import_routing_spec.rb b/spec/routing/import_routing_spec.rb index 7e78a1c0cd2..15d2f32de78 100644 --- a/spec/routing/import_routing_spec.rb +++ b/spec/routing/import_routing_spec.rb @@ -23,7 +23,7 @@ require 'spec_helper' # let(:actions) { [:index] } # let(:controller) { 'issues' } # end -shared_examples 'importer routing' do +RSpec.shared_examples 'importer routing' do let(:except_actions) { [] } let(:is_realtime) { false } @@ -62,7 +62,7 @@ end # realtime_changes_import_github GET /import/github/realtime_changes(.:format) import/github#jobs # import_github POST /import/github(.:format) import/github#create # new_import_github GET /import/github/new(.:format) import/github#new -describe Import::GithubController, 'routing' do +RSpec.describe Import::GithubController, 'routing' do it_behaves_like 'importer routing' do let(:provider) { 'github' } let(:is_realtime) { true } @@ -78,7 +78,7 @@ end # realtime_changes_import_gitea GET /import/gitea/realtime_changes(.:format) import/gitea#jobs # import_gitea POST /import/gitea(.:format) import/gitea#create # new_import_gitea GET /import/gitea/new(.:format) import/gitea#new -describe Import::GiteaController, 'routing' do +RSpec.describe Import::GiteaController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'gitea' } @@ -90,25 +90,39 @@ describe Import::GiteaController, 'routing' do end end -# status_import_gitlab GET /import/gitlab/status(.:format) import/gitlab#status -# callback_import_gitlab GET /import/gitlab/callback(.:format) import/gitlab#callback -# jobs_import_gitlab GET /import/gitlab/jobs(.:format) import/gitlab#jobs -# import_gitlab POST /import/gitlab(.:format) import/gitlab#create -describe Import::GitlabController, 'routing' do +# status_import_gitlab GET /import/gitlab/status(.:format) import/gitlab#status +# callback_import_gitlab GET /import/gitlab/callback(.:format) import/gitlab#callback +# realtime_changes_import_gitlab GET /import/gitlab/realtime_changes(.:format) import/gitlab#realtime_changes +# import_gitlab POST /import/gitlab(.:format) import/gitlab#create +RSpec.describe Import::GitlabController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:new] } let(:provider) { 'gitlab' } + let(:is_realtime) { true } end end -# status_import_bitbucket GET /import/bitbucket/status(.:format) import/bitbucket#status -# callback_import_bitbucket GET /import/bitbucket/callback(.:format) import/bitbucket#callback -# jobs_import_bitbucket GET /import/bitbucket/jobs(.:format) import/bitbucket#jobs -# import_bitbucket POST /import/bitbucket(.:format) import/bitbucket#create -describe Import::BitbucketController, 'routing' do +# status_import_bitbucket GET /import/bitbucket/status(.:format) import/bitbucket#status +# callback_import_bitbucket GET /import/bitbucket/callback(.:format) import/bitbucket#callback +# realtime_changes_import_bitbucket GET /import/bitbucket/realtime_changes(.:format) import/bitbucket#realtime_changes +# import_bitbucket POST /import/bitbucket(.:format) import/bitbucket#create +RSpec.describe Import::BitbucketController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:new] } let(:provider) { 'bitbucket' } + let(:is_realtime) { true } + end +end + +# status_import_bitbucket_server GET /import/bitbucket_server/status(.:format) import/bitbucket_server#status +# callback_import_bitbucket_server GET /import/bitbucket_server/callback(.:format) import/bitbucket_server#callback +# realtime_changes_import_bitbucket_server GET /import/bitbucket_server/realtime_changes(.:format) import/bitbucket_server#realtime_changes +# new_import_bitbucket_server GET /import/bitbucket_server/new(.:format) import/bitbucket_server#new +# import_bitbucket_server POST /import/bitbucket_server(.:format) import/bitbucket_server#create +RSpec.describe Import::BitbucketServerController, 'routing' do + it_behaves_like 'importer routing' do + let(:provider) { 'bitbucket_server' } + let(:is_realtime) { true } end end @@ -119,7 +133,7 @@ end # create_user_map_import_google_code POST /import/google_code/user_map(.:format) import/google_code#create_user_map # import_google_code POST /import/google_code(.:format) import/google_code#create # new_import_google_code GET /import/google_code/new(.:format) import/google_code#new -describe Import::GoogleCodeController, 'routing' do +RSpec.describe Import::GoogleCodeController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'google_code' } @@ -138,17 +152,18 @@ describe Import::GoogleCodeController, 'routing' do end end -# status_import_fogbugz GET /import/fogbugz/status(.:format) import/fogbugz#status -# callback_import_fogbugz POST /import/fogbugz/callback(.:format) import/fogbugz#callback -# jobs_import_fogbugz GET /import/fogbugz/jobs(.:format) import/fogbugz#jobs -# new_user_map_import_fogbugz GET /import/fogbugz/user_map(.:format) import/fogbugz#new_user_map -# create_user_map_import_fogbugz POST /import/fogbugz/user_map(.:format) import/fogbugz#create_user_map -# import_fogbugz POST /import/fogbugz(.:format) import/fogbugz#create -# new_import_fogbugz GET /import/fogbugz/new(.:format) import/fogbugz#new -describe Import::FogbugzController, 'routing' do +# status_import_fogbugz GET /import/fogbugz/status(.:format) import/fogbugz#status +# callback_import_fogbugz POST /import/fogbugz/callback(.:format) import/fogbugz#callback +# realtime_changes_import_fogbugz GET /import/fogbugz/realtime_changes(.:format) import/fogbugz#realtime_changes +# new_user_map_import_fogbugz GET /import/fogbugz/user_map(.:format) import/fogbugz#new_user_map +# create_user_map_import_fogbugz POST /import/fogbugz/user_map(.:format) import/fogbugz#create_user_map +# import_fogbugz POST /import/fogbugz(.:format) import/fogbugz#create +# new_import_fogbugz GET /import/fogbugz/new(.:format) import/fogbugz#new +RSpec.describe Import::FogbugzController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'fogbugz' } + let(:is_realtime) { true } end it 'to #callback' do @@ -167,7 +182,7 @@ end # import_gitlab_project POST /import/gitlab_project(.:format) import/gitlab_projects#create # POST /import/gitlab_project(.:format) import/gitlab_projects#create # new_import_gitlab_project GET /import/gitlab_project/new(.:format) import/gitlab_projects#new -describe Import::GitlabProjectsController, 'routing' do +RSpec.describe Import::GitlabProjectsController, 'routing' do it 'to #create' do expect(post('/import/gitlab_project')).to route_to('import/gitlab_projects#create') end @@ -179,7 +194,7 @@ end # new_import_phabricator GET /import/phabricator/new(.:format) import/phabricator#new # import_phabricator POST /import/phabricator(.:format) import/phabricator#create -describe Import::PhabricatorController, 'routing' do +RSpec.describe Import::PhabricatorController, 'routing' do it 'to #create' do expect(post("/import/phabricator")).to route_to("import/phabricator#create") end |