gitlab-org--gitlab-foss/spec/tasks/tokens_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
606 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'rake_helper'
RSpec.describe 'tokens rake tasks', :silence_stdout do
let!(:user) { create(:user) }
before do
Rake.application.rake_require 'tasks/tokens'
end
describe 'reset_all_email task' do
it 'changes the incoming email token' do
expect { run_rake_task('tokens:reset_all_email') }.to change { user.reload.incoming_email_token }
end
end
2017-05-23 08:09:45 -04:00
describe 'reset_all_feed task' do
it 'changes the feed token for the user' do
expect { run_rake_task('tokens:reset_all_feed') }.to change { user.reload.feed_token }
2017-05-23 08:09:45 -04:00
end
end
end