diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-09-15 14:37:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-15 14:37:58 +0200 |
commit | ed099d8bdc5b3d9e7df7ce5358441887e6bb7e48 (patch) | |
tree | e55ddfa97c0c9932e35c8ffd7cb59434084bd478 /spec/controllers | |
parent | bbcbf12215a5ec69362a769c1bae9c630eda0ed4 (diff) |
Change account suspensions to be reversible by default (#14726)
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/auth/registrations_controller_spec.rb | 3 | ||||
-rw-r--r-- | spec/controllers/concerns/export_controller_concern_spec.rb | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/spec/controllers/auth/registrations_controller_spec.rb b/spec/controllers/auth/registrations_controller_spec.rb index c2e9f33a8..bef822763 100644 --- a/spec/controllers/auth/registrations_controller_spec.rb +++ b/spec/controllers/auth/registrations_controller_spec.rb @@ -199,9 +199,10 @@ RSpec.describe Auth::RegistrationsController, type: :controller do end subject do + inviter = Fabricate(:user, confirmed_at: 2.days.ago) Setting.registrations_mode = 'approved' request.headers["Accept-Language"] = accept_language - invite = Fabricate(:invite, max_uses: nil, expires_at: 1.hour.from_now) + 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' } } end diff --git a/spec/controllers/concerns/export_controller_concern_spec.rb b/spec/controllers/concerns/export_controller_concern_spec.rb index e5861c801..fce129bee 100644 --- a/spec/controllers/concerns/export_controller_concern_spec.rb +++ b/spec/controllers/concerns/export_controller_concern_spec.rb @@ -5,6 +5,7 @@ require 'rails_helper' describe ApplicationController, type: :controller do controller do include ExportControllerConcern + def index send_export_file end |