|
|
@ -2,6 +2,9 @@ require 'rails_helper'
|
|
|
|
require 'devise_two_factor/spec_helpers'
|
|
|
|
require 'devise_two_factor/spec_helpers'
|
|
|
|
|
|
|
|
|
|
|
|
RSpec.describe User, type: :model do
|
|
|
|
RSpec.describe User, type: :model do
|
|
|
|
|
|
|
|
let(:password) { 'abcd1234' }
|
|
|
|
|
|
|
|
let(:account) { Fabricate(:account, username: 'alice') }
|
|
|
|
|
|
|
|
|
|
|
|
it_behaves_like 'two_factor_backupable'
|
|
|
|
it_behaves_like 'two_factor_backupable'
|
|
|
|
|
|
|
|
|
|
|
|
describe 'otp_secret' do
|
|
|
|
describe 'otp_secret' do
|
|
|
@ -96,9 +99,6 @@ RSpec.describe User, type: :model do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
let(:account) { Fabricate(:account, username: 'alice') }
|
|
|
|
|
|
|
|
let(:password) { 'abcd1234' }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe 'blacklist' do
|
|
|
|
describe 'blacklist' do
|
|
|
|
around(:each) do |example|
|
|
|
|
around(:each) do |example|
|
|
|
|
old_blacklist = Rails.configuration.x.email_blacklist
|
|
|
|
old_blacklist = Rails.configuration.x.email_blacklist
|
|
|
|