You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
531 B

# frozen_string_literal: true
require 'rails_helper'
describe OneTimeKey do
describe 'validations' do
context 'with an invalid signature' do
let(:one_time_key) { Fabricate.build(:one_time_key, signature: 'wrong!') }
it 'is invalid' do
expect(one_time_key).to_not be_valid
end
end
context 'with an invalid key' do
let(:one_time_key) { Fabricate.build(:one_time_key, key: 'wrong!') }
it 'is invalid' do
expect(one_time_key).to_not be_valid
end
end
end
end