1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-24 03:28:45 +09:00
YuruToot/spec/models/one_time_key_spec.rb
2023-03-04 17:00:00 +01:00

24 lines
531 B
Ruby

# 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