about summary refs log tree commit diff
path: root/spec/controllers/auth
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2023-03-10 07:33:30 -0500
committerGitHub <noreply@github.com>2023-03-10 13:33:30 +0100
commit688287c59d526ef76089322a368789f5846c6ac3 (patch)
tree0a89ad3e71b45b123388898cc67f93ed5a022b91 /spec/controllers/auth
parent56bddfbfa39956ea3a8c52721eb364b1120634f6 (diff)
Coverage improvement round-out following up previous work (#23987)
Diffstat (limited to 'spec/controllers/auth')
-rw-r--r--spec/controllers/auth/setup_controller_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/controllers/auth/setup_controller_spec.rb b/spec/controllers/auth/setup_controller_spec.rb
new file mode 100644
index 000000000..75e42aaf9
--- /dev/null
+++ b/spec/controllers/auth/setup_controller_spec.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe Auth::SetupController do
+  render_views
+
+  describe 'GET #show' do
+    context 'with a signed out request' do
+      it 'returns http redirect' do
+        get :show
+        expect(response).to be_redirect
+      end
+    end
+
+    context 'with an unconfirmed signed in user' do
+      before { sign_in Fabricate(:user, confirmed_at: nil) }
+
+      it 'returns http success' do
+        get :show
+        expect(response).to have_http_status(200)
+      end
+    end
+  end
+end