models: require belong_to associations on trusted_device_token

This commit is contained in:
Pierre de La Morinerie 2020-07-20 17:05:04 +02:00
parent d807700c7b
commit 71d9774d58
3 changed files with 8 additions and 3 deletions

View file

@ -1,6 +1,6 @@
RSpec.describe TrustedDeviceToken, type: :model do
describe '#token_valid?' do
let(:token) { TrustedDeviceToken.create }
let(:token) { create(:trusted_device_token) }
context 'when the token is create after login_token_validity' do
it { expect(token.token_valid?).to be true }
@ -14,7 +14,7 @@ RSpec.describe TrustedDeviceToken, type: :model do
end
describe '#token_young?' do
let(:token) { TrustedDeviceToken.create }
let(:token) { create(:trusted_device_token) }
context 'when the token is create after login_token_youth' do
it { expect(token.token_young?).to be true }