2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'rake_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe 'gitlab:ldap:rename_provider rake task' do
|
2017-08-17 22:00:37 +05:30
|
|
|
it 'completes without error' do
|
|
|
|
Rake.application.rake_require 'tasks/gitlab/ldap'
|
|
|
|
stub_warn_user_is_not_gitlab
|
2018-03-17 18:26:18 +05:30
|
|
|
stub_env('force', 'yes')
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
create(:identity) # Necessary to prevent `exit 1` from the task.
|
|
|
|
|
|
|
|
run_rake_task('gitlab:ldap:rename_provider', 'ldapmain', 'ldapfoo')
|
|
|
|
end
|
|
|
|
end
|