mirror of
https://github.com/mastodon/mastodon.git
synced 2025-02-01 15:01:40 +01:00
28 lines
578 B
Ruby
28 lines
578 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require 'rails_helper'
|
||
|
|
||
|
RSpec.describe 'Auth Setup' do
|
||
|
describe 'GET /auth/setup' do
|
||
|
context 'with a signed out request' do
|
||
|
it 'redirects to root' do
|
||
|
get '/auth/setup'
|
||
|
|
||
|
expect(response)
|
||
|
.to redirect_to(new_user_session_url)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
context 'with a confirmed signed in user' do
|
||
|
before { sign_in Fabricate(:user, confirmed_at: 2.days.ago) }
|
||
|
|
||
|
it 'redirects to root' do
|
||
|
get '/auth/setup'
|
||
|
|
||
|
expect(response)
|
||
|
.to redirect_to(root_url)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|