]>
cat aescling's git repositories - mastodon.git/blob - spec/controllers/auth/confirmations_controller_spec.rb
1 # frozen_string_literal: true
5 describe Auth
::ConfirmationsController, type
: :controller do
7 it
'returns http success' do
8 @request.env['devise.mapping'] = Devise
.mappings
[:user]
10 expect(response
).to
have_http_status(:success)
14 describe
'GET #show' do
15 let!
(:user) { Fabricate(:user, confirmation_token
: 'foobar', confirmed_at
: nil) }
18 allow(BootstrapTimelineWorker
).to
receive(:perform_async)
19 @request.env['devise.mapping'] = Devise
.mappings
[:user]
20 get
:show, params
: { confirmation_token
: 'foobar' }
23 it
'redirects to login' do
24 expect(response
).to
redirect_to(new_user_session_path
)
27 it
'queues up bootstrapping of home timeline' do
28 expect(BootstrapTimelineWorker
).to
have_received(:perform_async).with(user
.account_id
)
This page took 0.084735 seconds and 4 git commands to generate.