Sha256: c9285c04803633561955d397285cacf04aae070566610d3a2c4a67459e2b2b77

Contents?: true

Size: 567 Bytes

Versions: 12

Compression:

Stored size: 567 Bytes

Contents

require 'spec_helper'
require 'active_model'

class TwoFactorBackupableDouble
  extend ::ActiveModel::Callbacks
  include ::ActiveModel::Validations::Callbacks
  extend  ::Devise::Models

  define_model_callbacks :update

  devise :two_factor_authenticatable, :two_factor_backupable,
         :otp_secret_encryption_key => 'test-key'*4

  attr_accessor :otp_backup_codes
end

describe ::Devise::Models::TwoFactorBackupable do
  context 'When included in a class' do
    subject { TwoFactorBackupableDouble.new }

    it_behaves_like 'two_factor_backupable'
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
devise-two-factor-4.1.1 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-4.1.0 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-4.0.2 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-4.0.1 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-4.0.0 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-3.1.0 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-3.0.3 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-3.0.2 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-3.0.1 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-3.0.0 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-2.2.1 spec/devise/models/two_factor_backupable_spec.rb
devise-two-factor-2.2.0 spec/devise/models/two_factor_backupable_spec.rb