Add specs for User
This commit is contained in:
parent
41d48d2670
commit
a4a99fa0dd
4 changed files with 8 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -77,5 +77,6 @@ group :test do
|
|||
gem 'selenium-webdriver', '~> 3.14'
|
||||
gem 'shoulda-matchers', '~> 4.2'
|
||||
gem 'simplecov', '~> 0.16', require: false
|
||||
gem 'timecop', '~> 0.9'
|
||||
gem 'webmock', '~> 3.8'
|
||||
end
|
||||
|
|
|
@ -448,6 +448,7 @@ GEM
|
|||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
timecop (0.9.1)
|
||||
tins (1.24.0)
|
||||
sync
|
||||
turbolinks (5.2.1)
|
||||
|
@ -540,6 +541,7 @@ DEPENDENCIES
|
|||
simplecov (~> 0.16)
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
timecop (~> 0.9)
|
||||
turbolinks (~> 5.2)
|
||||
uglifier (>= 4.0)
|
||||
web-console (>= 3.3.0)
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
require 'devise_two_factor/spec_helpers'
|
||||
|
||||
RSpec.describe User do
|
||||
subject { create(:usual_account).user }
|
||||
|
||||
it_behaves_like 'two_factor_authenticatable'
|
||||
it_behaves_like 'two_factor_backupable'
|
||||
|
||||
describe '#account' do
|
||||
it { is_expected.to belong_to(:account).required }
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ RSpec.configure do |config|
|
|||
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
||||
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
||||
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
||||
config.disable_monkey_patching!
|
||||
# config.disable_monkey_patching!
|
||||
|
||||
# Use the documentation formatter for detailed output,
|
||||
# unless a formatter has already been configured
|
||||
|
|
Reference in a new issue