about summary refs log tree commit diff
path: root/spec/controllers/auth/registrations_controller_spec.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-19 10:42:55 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-02-19 10:42:55 +0100
commit7452a959989f1259b68d08814437bab53ee89bb0 (patch)
tree389c2be7b7a326729e4687019a58950a07bd2dde /spec/controllers/auth/registrations_controller_spec.rb
parent4c68189d2b8b6a9a74fc13862b11bf6c6d523409 (diff)
parentfef6c59b3abe349132dbe910b6aa243e59b732bb (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/dependabot.yml`:
  Upstream made changes while we have dropped this file.
  Keep the file deleted.
- `.prettierignore`:
  Upstream made changes at the end of the file, where we
  had our extra lines.
  Just moved our extra lines back at the end.
- `app/serializers/initial_state_serializer.rb`:
  Upstream code style changes.
  Applied them.
- `app/services/backup_service.rb`:
  Upstream code style changes.
  Applied them.
Diffstat (limited to 'spec/controllers/auth/registrations_controller_spec.rb')
-rw-r--r--spec/controllers/auth/registrations_controller_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/controllers/auth/registrations_controller_spec.rb b/spec/controllers/auth/registrations_controller_spec.rb
index 0ebf6641f..7298bde00 100644
--- a/spec/controllers/auth/registrations_controller_spec.rb
+++ b/spec/controllers/auth/registrations_controller_spec.rb
@@ -32,7 +32,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
   describe 'GET #edit' do
     it 'returns http success' do
-      request.env["devise.mapping"] = Devise.mappings[:user]
+      request.env['devise.mapping'] = Devise.mappings[:user]
       sign_in(Fabricate(:user))
       get :edit
       expect(response).to have_http_status(200)
@@ -41,7 +41,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
   describe 'GET #update' do
     it 'returns http success' do
-      request.env["devise.mapping"] = Devise.mappings[:user]
+      request.env['devise.mapping'] = Devise.mappings[:user]
       sign_in(Fabricate(:user), scope: :user)
       post :update
       expect(response).to have_http_status(200)
@@ -49,7 +49,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
     context 'when suspended' do
       it 'returns http forbidden' do
-        request.env["devise.mapping"] = Devise.mappings[:user]
+        request.env['devise.mapping'] = Devise.mappings[:user]
         sign_in(Fabricate(:user, account_attributes: { username: 'test', suspended_at: Time.now.utc }), scope: :user)
         post :update
         expect(response).to have_http_status(403)
@@ -59,7 +59,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
   describe 'GET #new' do
     before do
-      request.env["devise.mapping"] = Devise.mappings[:user]
+      request.env['devise.mapping'] = Devise.mappings[:user]
     end
 
     context do
@@ -92,7 +92,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
       I18n.locale = current_locale
     end
 
-    before { request.env["devise.mapping"] = Devise.mappings[:user] }
+    before { request.env['devise.mapping'] = Devise.mappings[:user] }
 
     context do
       around do |example|
@@ -103,7 +103,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
       subject do
         Setting.registrations_mode = 'open'
-        request.headers["Accept-Language"] = accept_language
+        request.headers['Accept-Language'] = accept_language
         post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', agreement: 'true' } }
       end
 
@@ -129,7 +129,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
       subject do
         Setting.registrations_mode = 'open'
-        request.headers["Accept-Language"] = accept_language
+        request.headers['Accept-Language'] = accept_language
         post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', agreement: 'false' } }
       end
 
@@ -149,7 +149,7 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
       subject do
         Setting.registrations_mode = 'approved'
-        request.headers["Accept-Language"] = accept_language
+        request.headers['Accept-Language'] = accept_language
         post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', agreement: 'true' } }
       end
 
@@ -176,9 +176,9 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
 
       subject do
         Setting.registrations_mode = 'approved'
-        request.headers["Accept-Language"] = accept_language
+        request.headers['Accept-Language'] = accept_language
         invite = Fabricate(:invite, max_uses: nil, expires_at: 1.hour.ago)
-        post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', 'invite_code': invite.code, agreement: 'true' } }
+        post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', invite_code: invite.code, agreement: 'true' } }
       end
 
       it 'redirects to setup' do
@@ -208,9 +208,9 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
         inviter = Fabricate(:user, confirmed_at: 2.days.ago)
         Setting.registrations_mode = 'approved'
         Setting.require_invite_text = true
-        request.headers["Accept-Language"] = accept_language
+        request.headers['Accept-Language'] = accept_language
         invite = Fabricate(:invite, user: inviter, max_uses: nil, expires_at: 1.hour.from_now)
-        post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', 'invite_code': invite.code, agreement: 'true' } }
+        post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678', invite_code: invite.code, agreement: 'true' } }
       end
 
       it 'redirects to setup' do