Add LoginActivity
model spec and BrowserDetection
concern shared example (#32959)
This commit is contained in:
parent
9fc2fc2251
commit
87e7ad9b8f
3 changed files with 55 additions and 33 deletions
17
spec/models/login_activity_spec.rb
Normal file
17
spec/models/login_activity_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe LoginActivity do
|
||||
include_examples 'BrowserDetection'
|
||||
|
||||
describe 'Associations' do
|
||||
it { is_expected.to belong_to(:user).required }
|
||||
end
|
||||
|
||||
describe 'Validations' do
|
||||
subject { Fabricate.build :login_activity }
|
||||
|
||||
it { is_expected.to define_enum_for(:authentication_method).backed_by_column_of_type(:string) }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue