summaryrefslogtreecommitdiff
path: root/spec/tasks
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-10-12 10:57:55 +0200
committerDouwe Maan <douwe@selenight.nl>2017-11-02 11:39:02 +0100
commitcd3b4ba4abdc96341f38d1919cb5e76f46f11b07 (patch)
treeb8704ef71133924fb6611d74ac12f4b9715e7cc0 /spec/tasks
parentfbdf057898475653c847601f257e140494944f46 (diff)
downloadgitlab-ce-cd3b4ba4abdc96341f38d1919cb5e76f46f11b07.tar.gz
Remove gitlab:users:clear_all_authentication_tokens rake task
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/users_rake_spec.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/tasks/gitlab/users_rake_spec.rb b/spec/tasks/gitlab/users_rake_spec.rb
deleted file mode 100644
index 972670e7f91..00000000000
--- a/spec/tasks/gitlab/users_rake_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require 'spec_helper'
-require 'rake'
-
-describe 'gitlab:users namespace rake task' do
- let(:enable_registry) { true }
-
- before :all do
- Rake.application.rake_require 'tasks/gitlab/helpers'
- Rake.application.rake_require 'tasks/gitlab/users'
-
- # empty task as env is already loaded
- Rake::Task.define_task :environment
- end
-
- def run_rake_task(task_name)
- Rake::Task[task_name].reenable
- Rake.application.invoke_task task_name
- end
-
- describe 'clear_all_authentication_tokens' do
- before do
- # avoid writing task output to spec progress
- allow($stdout).to receive :write
- end
-
- context 'gitlab version' do
- it 'clears the authentication token for all users' do
- create_list(:user, 2)
-
- expect(User.pluck(:authentication_token)).to all(be_present)
-
- run_rake_task('gitlab:users:clear_all_authentication_tokens')
-
- expect(User.pluck(:authentication_token)).to all(be_nil)
- end
- end
- end
-end